Uploading a file and limiting the size of the file.

  • Thread starter Thread starter Mufasa
  • Start date Start date
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 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
 
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
 
Back
Top