Uploading a file and limiting the size of the file.

M

Mufasa

I am using the file upload control and want to limit the size of the file
that is uploaded. But it appears as if it actually uploads the file and then
does the check. Is that true?

Ideally I'd like to have it give me the results back before it uploads the
file so it doesn't need to waste all that time.

TIA - Jeff.
 
I

Ignacio Machin ( .NET/ C# MVP )

I am using the file upload control and want to limit the size of the file
that is uploaded. But it appears as if it actually uploads the file and then
does the check. Is that true?

Ideally I'd like to have it give me the results back before it uploads the
file so it doesn't need to waste all that time.

TIA - Jeff.

Hi,

Honestly I do not know of any form to knownig "in advance" the size of
the file.
You could post in the ASPNET NG to see if you get a more detailed
answer
 
M

Marc Gravell

Well, you can check the incoming content-length header quite early,
but it might be sending it without this header, in which case you'd
need to abort while reading.

Marc
 

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

Top