Author |
Topic  |
|
Anders M
Junior Member
 
Sweden
117 Posts |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 11 May 2001 : 10:13:00
|
The file attachment mod does not use any components it uses pure ASP, so you would be better off writing your own front end to the uploader
|
 |
|
Anders M
Junior Member
 
Sweden
117 Posts |
Posted - 11 May 2001 : 10:22:42
|
Ok. Time for me to learn about your mod. Could you please give me a hint wich files to study first. Which files in your mod are the "front end to the uploader"?
Thanks, -Anders M
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 11 May 2001 : 10:30:32
|
pop_upload.asp is the form you are given, the action of the form is uploadengine.asp, this is where the file is uploaded, the db written to etc, so you would probably want to edit this file.
look for this code
if boolAllowedType then Response.write "Uploading.... Please wait" boolSuccess = saveDoc() If boolSuccess = "True" Then intoDB() strResult = "The File " & objUpload.Files.Item(0).FileName & " was uploaded to the Server" End If else strResult = "File Type Not Allowed" end if
the line in red is where it calls the save function, you just need to write your own save function
|
 |
|
Anders M
Junior Member
 
Sweden
117 Posts |
Posted - 11 May 2001 : 10:34:27
|
HuwR, thanks a lot 
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 11 May 2001 : 10:56:31
|
just shout if you need more help.
It may be an idea, to make it work with other components too, so try to keep your code as generic as possible, then we can look at adding other component support like ASPupload
|
 |
|
Anders M
Junior Member
 
Sweden
117 Posts |
Posted - 11 May 2001 : 11:00:31
|
Now I have studied your files. I see that I will have to change "\" to "/" in some places in your code, since I use Linux and not Windows.
Maybe you could use something like this in future versions of your mod? (I cut this piece of code from a ChiliSoft web page)
'Check the operating system to set the correct slash for the path Function GetSlash strAspOs = UCase(Request.ServerVariables("ASP_OS")) If InStr(strAspOs,"WINDOWS") Then GetSlash = "\" Else GetSlash = "/" End If end function
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 11 May 2001 : 11:51:43
|
quote:
Now I have studied your files. I see that I will have to change "\" to "/" in some places in your code, since I use Linux and not Windows.
Maybe you could use something like this in future versions of your mod? (I cut this piece of code from a ChiliSoft web page)
'Check the operating system to set the correct slash for the path Function GetSlash strAspOs = UCase(Request.ServerVariables("ASP_OS")) If InStr(strAspOs,"WINDOWS") Then GetSlash = "\" Else GetSlash = "/" End If end function
Very nice thankyou, I will update my code accordingly
|
 |
|
|
Topic  |
|