|
 |
asp_web_howto thread: Re: Using Request to get the details from a File Input
Message #1 by "phil griffiths" <pgtips@m...> on Fri, 1 Nov 2002 13:28:20
|
|
John,
When you use that enctype for uploads the file name is embedded in the
request, but it's not trivial to extract it coz its all in binary. Take a
look at some ASP Upload code, like this link:
http://www.asp101.com/articles/jacob/scriptupload.asp
...you'll see that the code here parses the request to extract things like
file name. You should be able to extract the relevant code to get the
file name from the header.
hth
Phil
>------------------------------------------------
> I am still unable to read the input from the response form when I input
a
f> ile nam as shown.
> <FORM ACTION="formresp.asp" ENCTYPE="MULTIPART/FORM-DATA" METHOD="POST">
<> TABLE WIDTH="100%">
<> TR>
> <TD ALIGN="RIGHT" VALIGN="TOP">Enter Filename:</TD>
<> %
'> ---
'> --- Note the use of the TYPE="FILE" specification
'> ---
%> >
> <TD ALIGN="LEFT"><INPUT TYPE="FILE" NAME="FILE1"><BR>
> </TD>
<> /TR>
<> TR>
> <TD ALIGN="RIGHT"> </TD>
> <TD ALIGN="LEFT"><INPUT TYPE="SUBMIT" NAME="SUB1" VALUE="Upload
F> ile"></TD>
<> /TR>
<> /TABLE>
> On the Action form I have a statement
> <% name=Request("FILE1")
> response.write name
> %>
> but this does not work and I requitre the name of this file for further
p> rocessing.
> Anybody out there can help?
> Thanks
J> ohn
Message #2 by "John Howe" <johnhowe@c...> on Sat, 2 Nov 2002 15:37:57 +0100
|
|
Phil,
Thanks for that. I have been to the site recommended and what a great help.
I think I would have spent many unhappy hours trying to find my own
solution.
John
-----Original Message-----
From: phil griffiths [mailto:pgtips@m...]
Sent: 01 November 2002 13:28
To: ASP Web HowTo
Subject: [asp_web_howto] Re: Using Request to get the details from a
File Input
John,
When you use that enctype for uploads the file name is embedded in the
request, but it's not trivial to extract it coz its all in binary. Take a
look at some ASP Upload code, like this link:
http://www.asp101.com/articles/jacob/scriptupload.asp
...you'll see that the code here parses the request to extract things like
file name. You should be able to extract the relevant code to get the
file name from the header.
hth
Phil
>------------------------------------------------
> I am still unable to read the input from the response form when I input
a
f> ile nam as shown.
> <FORM ACTION="formresp.asp" ENCTYPE="MULTIPART/FORM-DATA" METHOD="POST">
<> TABLE WIDTH="100%">
<> TR>
> <TD ALIGN="RIGHT" VALIGN="TOP">Enter Filename:</TD>
<> %
'> ---
'> --- Note the use of the TYPE="FILE" specification
'> ---
%> >
> <TD ALIGN="LEFT"><INPUT TYPE="FILE" NAME="FILE1"><BR>
> </TD>
<> /TR>
<> TR>
> <TD ALIGN="RIGHT"> </TD>
> <TD ALIGN="LEFT"><INPUT TYPE="SUBMIT" NAME="SUB1" VALUE="Upload
F> ile"></TD>
<> /TR>
<> /TABLE>
> On the Action form I have a statement
> <% name=Request("FILE1")
> response.write name
> %>
> but this does not work and I requitre the name of this file for further
p> rocessing.
> Anybody out there can help?
> Thanks
J> ohn
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
|
|
 |