You are here: Re: Checking File Size Before Upload « PHP Programming Language « IT news, forums, messages
Re: Checking File Size Before Upload

Posted by Andy Hassall on 12/17/66 11:56

On 22 Aug 2006 14:59:35 -0700, "jeremyz" <jeremy.zorn@gmail.com> wrote:

>I am not a developer, but I work with several and am posting this for
>them. We are trying to determine whether it is possible to check the
>size of a file before a user uploads it.
>
>Everything I've read suggests that this is impossible (or at least very
>difficult) in PHP, and this makes sense for a server-side language.
>What gives me pause, however, is the fact that when a user tries to
>upload a file larger than the max file size we allow, an error appears
>in our error log immediately -- yet the upload continues.
>
>So somehow PHP must be recognizing that the file is too big well before
>it's been uploaded. The question is how -- and how do we make the leap
>from that recognition to an immediate halt of the upload?

There's this: http://pdoru.from.ro/

... which is a file upload progress patch for PHP. The demo opens a popup
window that monitors the upload taking place in the first window.

Possibly this could be modified so the second window uses javascript to abort
the upload in the first window? Not sure. Not very nice, but the alternatives
are sparse.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация