Comments (6)
I don't have PHP so I can't test. I made this work with Python though.
Could you try messing with the boundary variable on line 176?
boundary = '------multipartformboundary' + (new Date).getTime(),
Perhaps PHP is expecting something different.
from jquery-filedrop.
perhaps try replacing line 176 with
boundary = '--PHP-MIX--' + (new Date).getTime(),
let me know if that works for u
from jquery-filedrop.
I got PHP working by changing line 191 to:
xhr.sendAsBinary('Content-Type: multipart/form-data; boundary='+boundary+'\r\nContent-Length: '+builder.length+'\r\n\r\n'+builder);
Using that fix, you can use the $_FILES array in PHP.
Also changed line 81 to:
builder += crlf+crlf;
in order to get other variables to transfer correctly.
from jquery-filedrop.
Thanks for the update sahl, $_POST and $_FILES are set correctly with your change.
Now that it is working there appears to be another problem. If I drag more than about 4 large files (about 1-2 meg each), the script fails on line 177:
builder = getBuilder(file.name, e.target.result, boundary);
with a console message 'file is not defined'.
There is a similar problem when using the script from http://www.thecssninja.com/javascript/fileapi, so I expect it is a Firefox issue. I am using v3.6.10
from jquery-filedrop.
Tried dragging 8 files, with sizes up to 5+ MB, and encountered no problems, also using Firefox 3.6.10 (windows). Maybe a permission problem on the file itself?
from jquery-filedrop.
thanks for the help sahl
from jquery-filedrop.
Related Issues (20)
- Upload event doesn't work HOT 1
- uploading very large files (200 MB +) results in allocation size overflow HOT 1
- Upload directly to s3 bucket
- file.name HOT 1
- RangeError: Maximum call stack size exceeded. HOT 2
- If drop and change event are bind a $('input:file') element, drop event not work
- Make dropzone clicking triggering fallback configurable
- unicode characters are not supported
- afterAll doesn't fire if files are rejected HOT 1
- Button Click Open FileUpload Dialog available? HOT 1
- Drag and drop doesn't work in MS Edge on Win10
- 'BrowserNotSupported' alert on IE10+ HOT 2
- maxfiles can't work. HOT 2
- Inaccurate file sizes on drop
- Upload on button click HOT 2
- jQuery(...).filedrop is not a function with jQuery 3.1.1 HOT 10
- Not Found, error message while draging file into filedrop area.
- Upload .jfif images
- How to disable the upload HOT 1
- Disable Drag and Drop
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-filedrop.