|
 |
asp_web_howto thread: uploading a file to a web folder
Message #1 by "Adeola" <aoadeyemo@h...> on Thu, 22 Mar 2001 12:56:42
|
|
Hi everyone,
I'm trying to upload to .jpg file to a web folder without using a
database. I've tried using the "server.createobject
("scripting.dictionary")" as well as "server.mapPath" to upload a
specified file but no luck so far.
Do i need to use the "softartisan.fileup" ?
Thanx
Ade
Message #2 by "Tim Morford" <tmorf@c...> on Thu, 22 Mar 2001 08:50:17 -0500
|
|
here you go
<HTML>
<HEAD><TITLE> File Upload </TITLE></HEAD>
<BODY>
<FORM ENCTYPE="multipart/form-data"
ACTION="getUpload.asp" METHOD=POST>
Please choose a picture to upload:
<BR><INPUT NAME="picture"
TYPE=FILE ACCEPT="image/*">
<BR><INPUT TYPE=SUBMIT VALUE="Submit Me!">
</FORM>
</BODY>
</HTML>
<%
FormSize = Request.TotalBytes
IF FormSize > 10000 THEN Response.End
FormData = Request.BinaryRead( FormSize )
bnCRLF = chrB( 13 ) & chrB( 10 )
Divider = LEFTB( FormData, INSTRB( FormData, bnCRLF ) - 1 )
DataStart = INSTRB( FormData, bnCRLF & bnCRLF ) + 4
DataEnd = INSTRB( DataStart + 1, FormData, divider ) - DataStart
Response.ContentType = "image/gif"
Response.BinaryWrite MIDB( FormData, DataStart, DataEnd )
%>
Tim
-----Original Message-----
From: Adeola [mailto:aoadeyemo@h...]
Sent: Thursday, March 22, 2001 12:57 PM
To: ASP Web HowTo
Subject: [asp_web_howto] uploading a file to a web folder
Hi everyone,
I'm trying to upload to .jpg file to a web folder without using a
database. I've tried using the "server.createobject
("scripting.dictionary")" as well as "server.mapPath" to upload a
specified file but no luck so far.
Do i need to use the "softartisan.fileup" ?
Thanx
Ade
Message #3 by "Adeola" <aoadeyemo@h...> on Thu, 22 Mar 2001 18:03:32
|
|
> Thanx Tim. I appreciate that.
u r a life saver
Adeola
here you go
>
> <HTML>
> <HEAD><TITLE> File Upload </TITLE></HEAD>
> <BODY>
> <FORM ENCTYPE="multipart/form-data"
> ACTION="getUpload.asp" METHOD=POST>
> Please choose a picture to upload:
> <BR><INPUT NAME="picture"
> TYPE=FILE ACCEPT="image/*">
> <BR><INPUT TYPE=SUBMIT VALUE="Submit Me!">
> </FORM>
>
> </BODY>
> </HTML>
>
> <%
> FormSize = Request.TotalBytes
> IF FormSize > 10000 THEN Response.End
> FormData = Request.BinaryRead( FormSize )
> bnCRLF = chrB( 13 ) & chrB( 10 )
> Divider = LEFTB( FormData, INSTRB( FormData, bnCRLF ) - 1 )
> DataStart = INSTRB( FormData, bnCRLF & bnCRLF ) + 4
> DataEnd = INSTRB( DataStart + 1, FormData, divider ) - DataStart
> Response.ContentType = "image/gif"
> Response.BinaryWrite MIDB( FormData, DataStart, DataEnd )
> %>
>
> Tim
> -----Original Message-----
> From: Adeola [mailto:aoadeyemo@h...]
> Sent: Thursday, March 22, 2001 12:57 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] uploading a file to a web folder
>
>
> Hi everyone,
> I'm trying to upload to .jpg file to a web folder without using a
> database. I've tried using the "server.createobject
> ("scripting.dictionary")" as well as "server.mapPath" to upload a
> specified file but no luck so far.
> Do i need to use the "softartisan.fileup" ?
>
> Thanx
> Ade
>
>
|
|
 |