Forum Moderators: coopster & phranque

Message Too Old, No Replies

Setting the file upload directory in NT IIS

         

javajive

9:36 pm on Aug 7, 2001 (gmt 0)



I'm using JSP (Web Logic) to work with uploaded files via:

<FORM METHOD=POST ACTION="addAttachment.jsp"
ENCTYPE="multipart/form-data">
<INPUT TYPE=FILE NAME="attachment">
<FORM>

The question I have is how do I configure the server to specify where the MIME encoded files turn up? (Pulling them to bits is fine)

C:\Temp is where they usually turn up. Is this specified in IIS or (doubtfully) Web Logic or am I stuck with the TEMP environment variable for the account the service runs under?

Seems like an easy ask, and I'm probably looking with my eyes closed, but can't find any documentation on the web or otherwise that covers it :(

Thanks in advance...

sugarkane

4:11 pm on Aug 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> stuck with the TEMP environment variable

I think this is, unfortunately, the case unless you can get hold of a class to handle uploads for you. There's one here [216.127.78.46] that's free for non-commercial use.

Do you have read / write access to the temp directory? If so you could just move it to a more suitable location before doing any processing.

javajive

9:14 pm on Aug 8, 2001 (gmt 0)



Thanks for that. Oreilly's code is always good, should have thought to look there :) Am using Walter Brameld's MultipartFormData which is very tidy robust code but not particularily feature rich.

I can read the files from wherever they arrive and move them to where I want, but on the production server they arrine in the WinNT directory and the client is understandably a little nervous about that...

sugarkane

9:21 pm on Aug 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> in the WinNT directory

Yikes, I'd be nervous too :o

I'm no NT expert, but AFAIK uploads always go to the temp directory specified in the environment variables (as you said) on any system, so could this be a bad configuration of the NT box?

Might be worth looking into as this could probably cause other problems if the case...