php - File Upload Size Validation -


validations big problem, if validate in php has functions etc need make work.. uploads file first on temporary location , checks, sucks. if uploads file of 100mb has wait time no error, internal php screw hanging page.

one way: js

//file id of input file alert(document.getelementbyid('file').files[0].filesize); 

this works in firefox, safari, chrome guess too, not: in opera, quite sure ie ie can taken care of activex file size opera still stuck. pretty unusable, anyways around it?

second: thinking, can give php custom alert or setting max size in php.ini or that, solve problem. thats looking for.

another update:

i have been fooling around rapidshare understand whats going on, realized use javascript file size checking :p works great firefox, , others said, ie has fall activex method opera victim :p cant give fancy javascript error in case. have fall server side validation takes few seconds more, not smooth show small error finally.

so need find out server side part without uploading, , in mind 1 way it:

  1. some internal php max size increased error can customize or run script find out whether max size has been reached or find post exceeded or that. // no idea this. server guy can :) think solve if php server guru here.

thanks , regards. please help. :)

here plugin uses flash + javascript (mootools) file upload. upside plugin it's supported , can github it. can limit max size, etc, , verify file information before upload. also, has example backend using php on how files handled after uploaded.

fancyupload

features

  • select , upload multiple files
  • filter files type in select
  • dialog lot of possible events add own behaviour
  • show , filter useful file information before upload starts
  • limit uploads file count, type or size
  • platform , server independent, needs flash9+ (> 95% penetration) works on browsers installed

here jquery plugin same mootools one:

uploadify


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -