Jump to content
hellomoto

File upload not working on mobile backend

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.

Share this post


Link to post
Share on other sites

I'm surprised there've been no replies... but more surprised that I can't find anything else on this topic, I would think this would concern people. Bumpin

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,

Little update. I tested on a samsung S9 with firefox. Same issue, the mp3 file is rejected (before the upload starts).

I will try with an Iphone also.

Share this post


Link to post
Share on other sites

Hi,

Found a stackoverflow  thread. It seems that on Android when you upload an audio file the extension is not present in the file name. This explains. Still searching for a solution.

Regards

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By humanafterall
      Hi,
      I would like to set an admin template to 'https only' as recommended in the Processwire security docs.
      However if I do this it forces this setting locally too, resulting in https://localhost requests which result in an error page.
      Is there a simple way round this? Setting https for templates in the config?
      Thanks!
    • By DanielKit
      Hi. I'm currently stuck at the login page in my project. Once I enter my admin username and my password and press login, nothing happens. The page just reloads. However, the URL changes from http://myipaddress/processwire to http://myipaddress/processwire/?login=1. I've checked all of my server settings, and to my knowledge, all seems to be fine there. I don't know where to go from here.. Thanks in advance!
    • By modifiedcontent
      Small annoyance: I get a horizontal scrollbar in UIkit admin area - or actually Admin Theme Boss based on Uikit 3. I tried to fix it with CSS, but had trouble isolating/targeting it and don't want to mess with module or core files. I think this issue has been reported before. Is there a recommended fix? 
    • By codevark
      The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
      I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
      Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.
      --Pete
×
×
  • Create New...