• Ever since the MIME app was deprecated in cPanel – the ability to force downloads on mobile has been less than stellar.

    I’ve added the MIME type to my htaccess file ‘AddType audio/mpeg .mp3’ but that had no effect.

    Later I learned that adding content-disposition to a php file was the solution but it’s not. This is what I came up with:

    ` header(‘Content-Type: audio/mpeg .mp3’);
    $file_name = ‘file.mp3’;
    $file_url = ‘https://partyfavorz.podbean.com/’ . $file_name;
    header(‘Content-Type: application/octet-stream’);
    header(“Content-Transfer-Encoding: Binary”);
    header(“Content-disposition: attachment; filename=\””.$file_name.”\””);
    readfile($file_url);
    exit;’

    I also tried adding it to the functions.php file of my child theme but that forces a download automatically even when you go to my homepage without clicking on anything.

    My podcast is subscriber based so it requires a username and password to login to stream or download. A box pops up asking for the information and then it works. I just want the file to download automatically once the subscriber is logged in and clicks on the download button, which works fine on desktop but not on mobile.

    On mobile – it takes you to a black player that attempts to load before finally displaying the default WordPress player with three vertical dots you must click and then click again to download.

    Other than the fact that the average user doesn’t have the knowledge to do that because it’s not the expected behavior – it’s also inconvenient.

    Stack Overflow appears to not really be engaging with anyone for solutions at the moment and I’ve already performed considerable research to find the correct solution to no avail.

    My question is would it be possible for Powerpress to write a line of code that’s standard with the default WordPress player for downloads automatically on mobile devices without having to jump through all these hoops to find a solution that’s either too complicated for a self-taught coder like myself or frankly doesn’t exist. It would sure be nice and increase user engagement.

    Your player and integration is so useful – I’d even be willing to pay a yearly subscription fee just for the privilege of using it even though I don’t use the Blubrry service (no offense).

    The sample page I provided is a free download with no login required so when you click on the download link – it should just download automatically on mobile but it still takes you to a separate WordPress player mentioned above to download.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forget this entire post. I had reached out to Siteground my host last year about this issue because the code wasn’t working and they added the content-disposition to my root folder, which was fine.

    After combing through my file manager this morning – I found a second htaccess file that specifically redirected the files on mobile to my podcast host. Don’t even get me started because I never put it there.

    Once deleted and clearing the cache – direct downloads are working again on mobile. I’d dump Siteground but they’re literally the best hosting service I’ve ever used. Carry on.

    Plugin Support Mike Dell

    (@benzoid)

    Sorry you are having issues with siteground. I’ve had really good luck with A2 hosting. I moved from another host to them last year and haven’t looked back!

    Happy Podcasting!

    -Mike

    • This reply was modified 4 years, 7 months ago by Mike Dell.

    Thanks for the suggestion. I actually used A2 3 years ago and while they were responsive, they were definitely going through some growing pains getting everything together – which is why I went back to Siteground.

    I don’t think what they did was intentional because the code they used was almost right but had the wrong “content-type” and wrong “content-disposition.”

    Even then, it still doesn’t work like I thought. Desktop is fine but mobile isn’t, which has now surpassed the amount of traffic I receive. I’m starting to think this is an Android thing but people using Safari have the same issue.

    I’m still going dowm a rabbit hole to find the solution. If cPanel had never deprecated the MIME app – this wouldn’t have even been an issue. All the solutions I’ve seen so far do not work – at all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to force downloads on mobile’ is closed to new replies.