Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Conversation

@DarrenInwood
Copy link

Adds feature detection for Android 4, forces this browser to use regular associative array instead of FormData, then adds an ajaxTransport to assemble the form POST manually.

@blueimp
Copy link
Owner

blueimp commented Mar 29, 2014

Thanks for your contribution, Darren.
I have the following suggestions:
Could you move the part starting at line 1433 here:
https://github.com/blueimp/jQuery-File-Upload/pull/3052/files#diff-39a834a672a00c7e950ff109bc4342d6R1433
And put it into an individual transport file, analogue to the iframe or postmessage transport files.
Also please make sure this works with other server-side upload handlers than PHP, thanks!

@DarrenInwood
Copy link
Author

Please feel free to rearrange and test as you see fit! I just needed a fork with chunked uploading on Android 4 for a project, it would be great if you could work this into the main repo.

The stringified form POST is adapted straight out of an MDN article, so I would be very surprised if there are any issues with other server tech, but definitely you would want to test with the supplied server tech at least.

There are some coupling issues with moving the transport to another file; the logic that gets the browser to use a {} instead of a FormData object depends on the transport being available.

@blueimp
Copy link
Owner

blueimp commented Apr 4, 2014

OK, I'll keep this open then, as att the moment I don't have much time to make the necessary changes myself.
Anyway thanks again for your contribution!

@blueimp blueimp added the feature label Apr 8, 2014
@chandon
Copy link

chandon commented Jul 18, 2014

There was a problem with formData (it's not possible to iterate through a formData object). My pull request on DarrenInwood/Master solves the problem (still to merge at this time)

With the #3253 pull request "Android 4+ bug : use of JpegEncoder", it's now possible to resize/upload images from the default Android 4x browser

@blueimp
Copy link
Owner

blueimp commented Apr 24, 2015

Given that this has been open for over a year and not been cleaned up, I'll close it for now.
I think doing client-side JPEG encoding is also not ideal.
I'll reconsider options to add Android support with a clean and updated pull request though.

@chandon
Copy link

chandon commented Apr 24, 2015

After one year, still buggy, although there is a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants