ProgerXP / FileDrop

Self-contained cross-browser pure JavaScript class for Drag & Drop and AJAX (multi) file upload.
filedropjs.org
The Unlicense
264 stars 61 forks source link

file name problem #81

Closed moscorp closed 3 years ago

moscorp commented 3 years ago

Just adding some statement in upload.php and found some problem

$acceptedext = array("pdf","csv","xls","xlsx","doc","docx","jpg","tif","png","ppt","rar","zip"); $ext = strtolower(pathinfo($_FILES['fd-file']['name'], PATHINFO_EXTENSION)); if (!in_array($ext, $acceptedext)) {   ...

it works in ie(mode7) and doesn't work in ie(mode8 or above) and chrome, it seems can't catch the file name, is there any variant am I missing ?!

ProgerXP commented 3 years ago

Due to supporting old browsers FileDrop requires that only one file is sent per request (the file takes all POST data for itself). https://github.com/ProgerXP/FileDrop/issues/80#issuecomment-832960937

This means $_FILES does not work when using drag & drop instead of