View Full Version : Uploading Images
ubigdummie
06-24-2003, 07:52 AM
Hey guys. I have a question. I now have my managevehicles.asp page working. The problem now is that I need to be able to upload 5 image files from the addvehicle.asp page, which posts to managevehicles.asp where the record is inserted into the DB. I have not tested this yet because I'm sure I'm going to need some advise here. I used Dreamweaver to insert a file upload in the form on addvehicle.asp. I named these file uploads as image1, image2, image3, image4, image5. I added these fields to the DB table. What data type should I use for these fields in the DB? How do I collect these files in managevehicles.asp? Then, how do I insert these into the DB? I'm uploading the HTML form here and also the managevehicles.asp page. If any of you can help, I'd be very greatful. Thanks. Andy
Bullschmidt
06-27-2003, 12:59 AM
First let's deal with the timeout issue which can be a problem if a user is uploading a fairly large file (although perhaps you don't want the timeout increased too much because you DON'T want a user uploading a large file).
For pure ASP (i.e. non component) solutions (and I believe this would be true for component solutions too) can increase the timeout for the page:
' Script timeout in seconds for this page.
' (60 x 60 = 1 hour.)
Server.ScriptTimeout = 60 * 60
Also the Anonymous Internet user needs Change permission on the folder that a file is going to be uploaded to and actually Full Access might be better if you are later going to use the FileSystemObject to delete a file.
Here is a resource for letting the user upload a file which is something that was unfortunately not built into ASP:
ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
http://www.aspzone.com/articles/john/aspUpload
cebuWebGuy
07-02-2003, 10:21 PM
Hi,
You can try to use a free asp component for uploading files.
aspUpload component is free to use and you can upload even download files by using that component. It's free.
Hope it helps....:)
melenm3
07-02-2003, 10:38 PM
you wouldn't happen to have a url or ftp site for a free aspUpLoad would you? I would be interested in looking that over.
af11k
07-02-2003, 11:37 PM
Do you "NEED" to store the images in the DB?
The way I do it is I upload the images to a separate directory and just store the paths to the images in the DB...
What Db are you using?
I use ASPUpload....it works great
here is a free one: http://www.freeaspupload.net
Are you running your own box?, fif not find out with your web hosting provider they may already have some installed components...
HTH
cebuWebGuy
07-03-2003, 12:12 AM
hi melenm,
sorry i forgot to include the url :)
heres the link where you can download the free asp component for uploading and downloading files:
http://www.aspsmart.com/aspSmartUpload/
it is in there in the download section.:)
hope it helps... have a nice day :)
melenm3
07-03-2003, 08:30 AM
I don't need to upload images but extremely large text files. The concept is the same I would think, uploading in binary, etc. But whether it is an image or text file, I can see the pros to being able to upload small images directly to a customer sql database. (i.e a car dealership etc.)
thanks for the links. I'll check it out.
NEVER give an I_User FULL access rights. MODIFY rights WILL allow you to delete files. Big no no.
melenm3
07-03-2003, 12:21 PM
Kodo,
I don't follow, can you please expand further on your post so I can understand better?
Thanks,
vBulletin v3.0.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.