Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
restricting upload size
Old 03-04-2007, 07:56 PM restricting upload size
Experienced Talker

Posts: 39
Name: Rob
Trades: 0
How do i restrict file upload size in pixels

this is what i have at the moment

File.MaxSize = 1024*1024
starsearch is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-04-2007, 09:45 PM Re: restricting upload size
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
With what component ??

However, You can't actually restrict the upload, until it's been uploaded then you can reject it.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-05-2007, 05:34 PM Re: restricting upload size
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Chris is right that something like this can't be done, as you need the entire file to open the image and find its pixel dimensions. He's even more right in that we need to know how you're doing this to give you any advice.

But, you could also come up with a max file size, and if you're streaming bytes in, you could count them and simply disconnect when the threshold is exceeded.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to restricting upload size
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11509 seconds with 12 queries