Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading files to server for processing

Status
Not open for further replies.

rabisco

MIS
Jan 4, 2007
21
I require some pointers to resources for writing code for file upload from a browser.


 
Thanks,

I have been trying the scripts out on my server and I'm finding out that one cannot use Request.Form after calling BinaryRead, and vice-versa.

My dilema is that every page in the application I'm adding this functionality used requeest.form to check that the user has a valid session.

if ((Request.QueryString("validate") <> Sessionand _
(Request.Form("validate") <> Sessionthen
call RequestDenied()
end if

Request form has to stay as it is vendor supplied. What are my options (if I have any), which would be compatible wth using request.form

 
Hmmmm..I'm sure there are other way to go about this, but the first thing that popped into my head was doing your file upload logic in an iframe, so you could keep your request.form()

In semi-pseudo code...
Code:
If Request.Form("validate") <> Sessionthen
'session is valid
DisplayIframe()
'display your iframe with the upload code
end if

In any case, I dug through some of my old stuff and in a past life I believe I used this code...

Not sure if that'll solve your binaryRead problem, but take a look..

 
Thanks for your reply.

Let me explain the set in some more detail.

I have form1.asp - which has the <input type="file"> to select a file from the local file system.

This then gets submitted to for form2.asp

are you saying I should have the upload logic in an ifroma inside this if statement

If Request.Form("validate") <> Sessionthen

.

Form 2.asp has as an include another asp page form3.asp, which also has

If Request.Form("validate") <> Sessionthen.

In fact all asp pages in this appliation have this if statement
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top