0

What would change in this code? It'sonly returning one line of data, theres got to be more than that for the file i selected, and if an image, how would i get the width/height of the image using this procedure?

 <%
 a=Request.TotalBytes
 b=Request.BinaryRead(a)
 Response.BinaryWrite(b)
 %>

 <form method="post" enctype="multipart/form-data">
 <input type="file" />
 <input type="submit" />
 </form>

2 Answers 2

2

Handling a binary upload in classic ASP is a little more complicated that just those three lines. There is a project with source code available to handle binary uploads from classic ASP. Maybe a look at that code will get you on your way. Otherwise, maybe the script itself is a solution for you:

http://www.freeaspupload.net/

http://www.freeaspupload.net/freeaspupload/viewsource.asp

Hope this helps,

Erik

Sign up to request clarification or add additional context in comments.

1 Comment

+1 but it might also be worth mentioning that the input type=file needs a name attribute.
1

I have written a script in the past that handles file upload plus identifying image dimensions - feel free to use it as long as you keep all the copyright lines in place. (Parts are not my own writing)

If you have more specific question or problem, feel free to ask.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.