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

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

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By sambadave
      Hi there
      Short version of question
      Let's say I have a page in the admin that contains a field... Is it possible to output the content from that field on another page in the admin? Almost like a reference.
      Longer version of question (with example)
      A house builder with multiple (60+) developments. They want to be able to create notices/messages that can be added to one or many developments. Handy for things like regional covid lockdowns or temporary office closures due to bad weather.
      My approach for the admin editing options:
      Add each message to each development
      Pros: You edit the message on the development page in context
      Cons: Very time consuming and repetitive if the same message needs to be applied to 60+ developments
        Control all the messages from one admin page and say which development each message should be applied to
      Pros: Easier to add/remove messages to more than one development at a time. Control all messages from one place.
      Cons: Content is not added on development page, which is where typical admin users may expect to find it I went for option 2 due to flexibility, and created a page within the admin for global development notices. This contains a repeater with:
      Field for message to display Checkbox list of all developments. The user can select which ones to apply each message to It's working really well but the only thing is that if the user goes to a specific development in the admin, the relevant messages aren't displayed in context (as they aren't edited on that page and instead on the global development notices page)... which may cause confusion when a new staff member / content admin tries to edit the text but there is no field when they go to the development admin page where they expect to see it...
      Solution???
      I don't require the message(s) to also be editable on the development page, but I wondered if there was a nice way to show it/them somehow. I feel like I am missing something really simple as I'm sure ProcessWire will have a nice way of achieving this, or maybe there are field settings that allow this kind of thing to happen?
      Any ideas on approaches or similar experiences would be much appreciated, even if it is just a much simpler example with the content from one field being shown on another admin page to get the ball rolling.
      Thanks in advance for any advice :)
    • 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? 
×
×
  • Create New...