PDA

View Full Version : File Upload Help


silverskymedia
05-19-2006, 07:47 PM
I'm running Server 2003 and I'm trying to establish something that will upload files to certain directories. I've found much code and components but I can't get them to work on the server box. IIS5 seems to run them ok, but IIS6 seems to think it's more "secure" and I'm having trouble getting them to work. Any help would be appreciated. Thanks.

ghell
05-20-2006, 09:54 PM
There are 2 good links in my signature for pure asp file uploads.

The most likely problem, however, is that you do not have write permissions on the directory and/or asp file. (should be on your internet guest account i think)

silverskymedia
05-22-2006, 03:49 PM
Thanks ghell, luckily I have access to the server so I can change the permissions. I'll give it a shot. Do you happen to have a working link to download the code? The one on the blog is pointing to "localhost".

silverskymedia
05-22-2006, 09:37 PM
The upload works great. I'm having trouble requesting form field values though. I'm getting this error,"Cannot use Request.Form collection after calling BinaryRead." What do I need to use to get form vaules? Thanks

ghell
05-22-2006, 10:36 PM
The jacob gilley example can be downloaded at various links from the page. The original code is located at http://www.asp101.com/articles/jacob/fileuploader.zip and people have submitted modifications for performance.

Request.Form cannot be used after a Request.Binary read as rightly stated there. Fortunately both the tutorial and jacob's code provide their own collection to replace Request.Form in this case :) I don't think they are as robust as Request.Form (for example not being able to use

For Each thing In Request.Form
Response.Write thing & " = " & Request.Form(thing) & "<br />"
Next

but you should be able to use their collections to pull specific things out etc :)

silverskymedia
05-22-2006, 10:59 PM
OK, so is it different for everyone? I've tried to find the object within the upload.asp page, but nothing works. I just need to know what to use in place of Request.Form(""). I'm sure someone has tried to do this. Thanks.

silverskymedia
05-22-2006, 11:58 PM
Finally, I got it! :) Had to use Uploader.Form("") thanks for your help.