latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Force download

Home Forums Community Forum Force download

This topic contains 10 replies, has 3 voices. Last updated by  Hamid 4 years, 2 months ago.

Topic Author Topic
Posted: Saturday Nov 3rd, 2012 at 2:52 pm #30561
Hamid
Username: zawiyaprojects

How can I get s2member to force my files (mp3) to download instead of playing in the browser. I have followed the instructions posted to resolve download problems by editing my .htaccess files in root and in the plugin folder. Still my mp3 files will not download.

Thanks

P.S. I’m having some difficulties using the forum search. The search functionality is hit and miss with me. Sometimes it works but then sometimes it returns blank results, even with searches I know have multiple hits. Not sure what is happening.

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Saturday Nov 3rd, 2012 at 5:03 pm #30566
Eduan
Username: Eduan
Moderator

Hello Hamid,

Could you please show us what shortcode you’re using in order for the users to download the file? Thanks. :)

Posted: Sunday Nov 4th, 2012 at 11:43 am #30591
Hamid
Username: zawiyaprojects

Hello Eduan,

Here is my shortcode:

<a href="http://mydomain.com/?s2member_file_download=Sounds/Test.mp3">Download Test</a>

What happens when I click on the link is that I am redirected to the cloudfront url which then plays the sound file in the browser.

Posted: Sunday Nov 4th, 2012 at 12:23 pm #30592
Hamid
Username: zawiyaprojects

Eduan, you got me thinking about this and so I turned off cloudfront and I am now able to download the mp3 files directly to my computer (instead of playing them within the browser).

Is this normal behavior when cloudfront is configured?

Posted: Sunday Nov 4th, 2012 at 4:54 pm #30606
Eduan
Username: Eduan
Moderator

Not sure, haven’t had much experience with downloads I’m afraid. :/

One thing you could do is visit this article and see if it helps:
Knowledge Base » Resolving Problems with File Downloads

– Eduan

Posted: Monday Nov 5th, 2012 at 5:55 pm #30700

Hamid, could you take a look at your extensions in this setting? [hilite path]Dashboard -› s2Member® -› Download Options -› Inline File Extensions[/hilite]

Posted: Tuesday Nov 6th, 2012 at 1:46 am #30742
Hamid
Username: zawiyaprojects

Cristian, it was blank initially (default setting) then I added a single entry for PDFs.

Oh and Eduan, I had followed that knowledge base previously and still had problems downloading files. That’s why I think it has something to do with cloudfront.

  • This reply was modified 4 years, 2 months ago by  Hamid.
Posted: Tuesday Nov 6th, 2012 at 6:35 am #30759

I see. Well, it may have to do with CloudFront if changing that changed the behavior.

I’m curious, though, since I know that whether it opens or downloads the file, is something you can configure in your browser. Could you try with another browser while using CloudFront, to see if you get the same result?

Posted: Tuesday Nov 6th, 2012 at 7:38 am #30766
Hamid
Username: zawiyaprojects

Yes I had tried other browsers. Firefox, Chrome and Opera all behaved the same (ie playing file in browser instead of downloading).

Posted: Wednesday Nov 7th, 2012 at 9:09 am #30891

I see. Thanks for confirming that.

Well, s2Member just generates a URL to the file so Amazon will let you download it, but the serving is done by Amazon, so you could see if it’s something to do with the settings for it. Try Amazon’s support, they should know if there’s a setting for this behavior (i.e. open/download).

Posted: Thursday Nov 8th, 2012 at 8:36 am #31021
Hamid
Username: zawiyaprojects

I looked into this deeper… it appears you can add a .htaccess file to the root of your bucket or change the header (something something) to force file downloads from Amazon but I couldn’t get anything to work.

In any case, I have turned off cloudfront for now.

Viewing 10 replies - 1 through 10 (of 10 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.