Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading multiple files with firefox (mobile) #11

Open
jatentaki opened this issue Apr 26, 2020 · 5 comments
Open

Uploading multiple files with firefox (mobile) #11

jatentaki opened this issue Apr 26, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@jatentaki
Copy link

jatentaki commented Apr 26, 2020

When I upload phone -> PC with firefox mobile and select multiple files at once, I instantly get a successful upload message but only some of the chosen files appear on my PC and are corrupt (0 bytes). It works fine with a single file as well as with chrome mobile.

Thanks a lot for the tool, it solves a big pain point for me :)

@mifi
Copy link
Owner

mifi commented Apr 28, 2020

Hi. How big are the files you're trying to upload? and how many? and does it work with another browser?

@jatentaki
Copy link
Author

jatentaki commented Apr 28, 2020

Hi, I tried uploading anywhere between 1 and ~150 .jpg images about 2mb each. It works for a single one but not for more. It does work with chrome (as I stated above).

Thanks for your interest

@mifi
Copy link
Owner

mifi commented Apr 28, 2020

Ok I managed to reproduce the problem. Firefox mobile does not properly send the multipart form like other browsers do.

When testing with two files...

Chrome mobile:

{
  'content-length': '522814',
  'content-type': 'multipart/form-data; boundary=----WebKitFormBoundaryBHWzyAyea9HBaafn',
  'accept-encoding': 'gzip, deflate',
}

Firefox mobile:

{
  'content-length': '230',
  'accept-encoding': 'gzip, deflate',
  'content-type': 'multipart/form-data; boundary=---------------------------116521216141164983863359111',
}

content-length is only 230.

I've googled a bit and tried to use fetch instead of axios but nothing seems to solve this issue on firefox mobile.

Maybe we need to upload files one-by-one

@mifi mifi added the bug Something isn't working label Apr 28, 2020
@mifi
Copy link
Owner

mifi commented Apr 28, 2020

I just tested with firefox on mac, and it works. So it's definitely a firefox mobile issue

@neffets
Copy link

neffets commented Nov 7, 2024

Again with Android-FF with at least version 131.0.1 and 132.0.1

Form is defined as:
<form action="/test/formular.93992.php" method="post" id="form_1" class="form" enctype="multipart/form-data">

Input defined as:
<input class="form-check-input" type="file" name="input_1_3" required="required" title="Upload" accept=".docx, .pptx, .xlsx, .pdf">

try to send an 1MB file, the request has only 12kBytes with this headers:

POST /test/beispielseiten/formulare/formular.93992.php HTTP/2
Host: stg.XXX.YY
User-Agent: Mozilla/5.0 (Android 15; Mobile; rv:132.0) Gecko/132.0 Firefox/132.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-DE,en-US;q=0.7,ru-RU;q=0.3
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://stg.XXXX.YY/test/formular.93992.php
Content-Type: multipart/form-data; boundary=---------------------------395248176313172189901482212775
Content-Length: 0
Origin: https://stg.XXX.YY
Connection: keep-alive
Cookie: PHPSESSID=mct6ko3rl5t9ig6rnhqj268rcu; dst_zones=; tz_info=; AAAAAAAAAA=52616e646f6d4956e244cea25f5ecef82778783b0735d51de50babfc073546286d3c745fbf95056cc9702afc679b8eff; session_info=%7B%22srvts%22%3A%201730975540%2C%20%22ttl%22%3A%2032400%7D; tz_info_saved=1730975542; wt_rla=102571513503709%2C2%2C1730975546347
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
TE: trailers
</pre>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants