Jump to content

File upload not working on mobile backend


hellomoto
 Share

Recommended Posts

I can't find anything about this in the forums or anything, but I have a file field that accepts mp3 files. Trying to upload from an Android phone (I've tried from two) the files aren't accepted, it says they must be mp3 files, but they are, so it's not reading the file extensions I guess... The error names the file name without the extension saying it's missing the extension. Has anyone come across this? Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Please provide a little more information regarding your installation (Versions of PHP, ProcessWire, MySQL) and problem.  What have you done to troubleshoot this issue?

I can't find anything about this in the forums or anything, but I have a file field that accepts mp3 files. 

Can you provide information regarding how you structured this file field?  Maybe a screenshot would help.

Trying to upload from an Android phone (I've tried from two) the files aren't accepted, it says they must be mp3 files, but they are, so it's not reading the file extensions I guess... The error names the file name without the extension saying it's missing the extension. 

Do you know if this is isolated to only Android phones?  What happens when you access this field from a computer (Windows, Mac, Linux) or different web browsers (Chrome, Safari, Internet Explorer)?  Do you still have the same error?

Any additional information would help someone to help you.  Good luck.

Link to comment
Share on other sites

Please provide a little more information regarding your installation (Versions of PHP, ProcessWire, MySQL) and problem.

Additionally knowing which version of Android you've tested with, and which browser you're using, would be helpful. There have been numerous bugs and missing features in the system, not to mention that even specific phone models sometimes seem to mess things up.

I'll see if I can reproduce this using one of my own phones, though.

So far it sounds like your phones are not sending the file extension properly, and in that case there are two likely scenarios: either the file didn't have an extension in the first place, or the file upload dialog (in your browser) is not sending it properly to the server. Hard to say without testing a bit more.

Link to comment
Share on other sites

So far unable to reproduce this. With ProcessWire 2.6.20 dev (Reno theme) and PHP 5.5.21 mobile upload seems to work fine for me. The phone I'm testing with is Samsung Galaxy S6 Edge running Android 5.1.1 ("Lollipop"), and I'm using the native browser.

One difference is that my sound recording app would only save mp4 or m4a, but this shouldn't matter at all for ProcessWire anyway.

Edit: Did another test with a downloaded mp3 file just to be sure. No issues with that one either. Still unable to reproduce the issue.

Edited by teppo
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Damn, not sure how I feel about these results... Okay so of course, the specs: PW 2.6.1. Uploads do work on desktop no problem. I have not tried on an iPhone, don't have access to one, but on my phone I get the following error: 

song title • song title is a invalid extension, please use one of: mp3, zip

That's in Chrome, on Android 5.0 (Samsung Galaxy S5 Active). On my friend's phone (who this is for) the Choose File button doesn't even do anything. He's using the Internet app on Android 4.4.2 (Alcatel OneTouch Fierce). 

I don't know what else I can do to troubleshoot this... I tried unchecking the decompress zip files option, not thinking it would do anything and it was indeed no help. Any ideas are very much welcome and appreciated! We're traveling and he's got unlimited data on his phone, so mobile upload capability would greatly help given our situation. 


The screen where I select songs from when clicking Choose File doesn't show their extensions, but when I go to browse my files on my phone and go to the audio ones, all the same files are there listed with the mp3 extension. 

Link to comment
Share on other sites

  • 5 years later...

Hi,

I bump into this exact same issue (5 years later !)

I run PW 3.0.168, php 7.4.

tested with Uikit and standard Admin UI theme.

I tested on android 10. phone is a xiaomi mi  mix 2S With two browsers : chrome and firefox.

 

my file field is set up like this see pict.

I tested with other files extension types and it worked (pdf, jpeg). Only with MP3 do I have this problem.

The file browser (that opens when you want to select the file) is the Xiaomi proprietary app.

What Hellmoto mentionned is also happening. When the file manager app opens to select the file you want to upload, the extension doesnt appear in the file name for MP3 whereas the file extensions appears in the displayed named for other types of extension.

I ll will try to test with some other android file manager.

Any Idea ?

Thanks

Screenshot 2021-01-03 at 17.37.09.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...