Accessing the PostedFile object of a multipart/form-data post

A

Abe Simpson

Hi all.

I am using a 3rd party ActiveX control to upload files to the web server
using the multipart/form-data format (described in RFC 1867). In regular
ASP, I have to use another 3rd party component, such as AspUpload, to
capture the files. In .NET, we have PostedFile, but I can' figure out how to
use it in this scenario.

There are no <INPUT TYPE="FILE" RUNAT="Server"> items to work with, nor are
there any <form>'s. All I have is a multipart/form-data stream, and the file
items are named FILE001, FILE002, etc. (there can be more than one). If I
handle this post from a Page_Load( Object sender, EventArgs e) function, how
to do I get those file items to be represented by PostedFile objects?

Thanks in advance.

-- Abe
 
B

Bruce Barker

look at the HttpRequest.Files collection.

note: asp.net loads the files into memory, so you may have to bump up the
workersize and maxrequestlength.

-- bruce (sqlwork.com)
 
A

Abe Simpson

Thanks Bruce, that worked great.

-- Abe


Bruce Barker said:
look at the HttpRequest.Files collection.

note: asp.net loads the files into memory, so you may have to bump up the
workersize and maxrequestlength.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top