Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 File Attachment with Chili!Upload
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Anders M
Junior Member

Sweden
117 Posts

Posted - 11 May 2001 :  10:11:56  Show Profile  Visit Anders M's Homepage
Has anyone used the File Attachment MOD with the Chili!Upload component? If not, do you think it would it be hard to mod the mod? (haven't studied the mod myself)

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 11 May 2001 :  10:13:00  Show Profile  Visit HuwR's Homepage
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

Go to Top of Page

Anders M
Junior Member

Sweden
117 Posts

Posted - 11 May 2001 :  10:22:42  Show Profile  Visit Anders M's Homepage
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

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 11 May 2001 :  10:30:32  Show Profile  Visit HuwR's Homepage
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


Go to Top of Page

Anders M
Junior Member

Sweden
117 Posts

Posted - 11 May 2001 :  10:34:27  Show Profile  Visit Anders M's Homepage
HuwR, thanks a lot

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 11 May 2001 :  10:56:31  Show Profile  Visit HuwR's Homepage
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

Go to Top of Page

Anders M
Junior Member

Sweden
117 Posts

Posted - 11 May 2001 :  11:00:31  Show Profile  Visit Anders M's Homepage
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


Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 11 May 2001 :  11:51:43  Show Profile  Visit HuwR's Homepage
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

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07