NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_FILES and form reloading

Paul Houle paul at devonianfarm.com
Sun Nov 12 10:18:15 EST 2006


David Krings wrote:
> Hi,
>
>     this requires that one has to do tests both on the client and the 
> server (can't just not do the server side checks!). I don't really see 
> why this extra effort is that much better. The task is to upload an 
> image file with some extra info, so the burden on uploading first and 
> then checking doesn't strike me as that huge as that one wants to 
> prevent submitting the form before all input is checked. And pop-ups are 
> often blocked, a small mistake that a user may even notice upon 
> reviewing the input before clicking submit throws an error....I don't 
> know. I don't say that this isn't a working approach, but users got 
> accustomed to getting a consolidated error report with a chance to 
> correct the wrong entries after submitting the form the first time.
>
>   
    It depends on the context,  but file uploads can take a ~long~ time.

    I used to work on a site that took document uploads from an 
international audience.  One day other people on the team noticed that 
we had http connections running for an hour or longer,  and they thought 
that there was something wrong with our system.

    I did some investigation,  and discovered that people were uploading 
multi-megabyte files over dialup connections from places like India.  It 
turned out the long connections were because of slow uploads,  not 
because of anything wrong with our system.

    This is an extreme case,  but it's not unusual for file uploads to 
take 30 seconds or more -- it's pretty frustrating to have to wait 30 
seconds to know that you did something wrong.

    I'm not a fan of client-side validation in Javascript,  since it 
often is done in a slapdash way,  but it helps a lot with forms that 
involve big uploads.



More information about the talk mailing list