How to limit the uploading file size in python?

P

praba kar

Dear All,

In Php we can limit the uploading file size
by php.ini configuration file. But In python what
way we can limit the file uploading size.
kindly let me know.

regards
Prabahar



__________________________________________________________
How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos http://in.photos.yahoo.com
 
F

Fuzzyman

Hello Prabahar,

It entirely depends on the mechanism you are using to receive the file
(there is no generic solution).

Is it within a CGI ? The normal way would be to check the file sized
and discard if it's too big. You'll have to do it within your code -
but it's probably a one line check !

Best Regards,

Fuzzy
http://www.voidspace.org.uk/python
 
T

Tim Roberts

praba kar said:
In Php we can limit the uploading file size
by php.ini configuration file. But In python what
way we can limit the file uploading size.
kindly let me know.

Unlike PHP, Python is a general-purpose language that is not targetted
specifically at the web, so it has no native concept of "uploading".

You can do this by using the LimitRequestBody directive in your Apache
configuration or .htaccess file.
 

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,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top