• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Download button not working correctly

Explorer ,
Feb 20, 2018 Feb 20, 2018

Copy link to clipboard

Copied

I posted about this earlier and it was suggested that this was a server side issue, so I contacted hosting support and they said it was a coding issue. Here's the background. You have to promise not to laugh at one part of this.

     I have several audio files that play on the site with Audio Player widget. I created a download button to the side. On local preview in Chrome, the button works great and immediately downloads the mp3 file. Uploaded to Business Catalyst or the ISP, when you click the download button, it loads a new page with just a player in the center that has a download button on the right that does finally download the file. I have searched for a widget for an audio player with a download button, but have not found one among the dozen or so I have looked at. I would like for the file to download immediately once the download button is clicked. Like it does on the local preview (Shift+Command+E) and the original site (OK, this is the don't laugh part. The old site was originally created in iWeb) linked here Eugenia Halsey Voiceover Demos.

     The new site is Professional Female Voice Over Talent | Eugenia Halsey.

I tried creating a .htaccess file and placing it in the direct of the index.html directory. I tried the following as content for the .htaccess file:

<FilesMatch "\.(mov|mp3|jpg|pdf)$”>

  ForceType application/octet-stream

  Header set Content-Disposition attachment

</FilesMatch>

and tried this:

AddType application/octet-stream .csv

AddType application/octet-stream .xls

AddType application/octet-stream .doc

AddType application/octet-stream .avi

AddType application/octet-stream .mp3

AddType application/octet-stream .mov

AddType application/octet-stream .pdf

and this:

<FilesMatch “\.(?I:mp3)$”>

  ForceType application/octet-stream

  Header set Content-Disposition attachment

</FilesMatch>

I also tried the below as html on the page

<a href="http://eugeniahalsey.com/assets/vo-demo-commercial-short-louder1.mp3"><img src="http://eugeniahalsey.com/images/download button small arrow.svg" width="35" height="38" alt="Download My Commercial Demo"></a>

Thank you in advance for any help that you can provide. Jon

Views

236

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Feb 21, 2018 Feb 21, 2018

Hey mildog78,

I suggest you follow the suggestions mentioned in this thread - Re: Active Download Link

It shall work for you and also easier to implement as compared to toggling with the .htaccess file.

Hope this helps.

Regards!

Ankush

Votes

Translate

Translate
Feb 21, 2018 Feb 21, 2018

Copy link to clipboard

Copied

LATEST

Hey mildog78,

I suggest you follow the suggestions mentioned in this thread - Re: Active Download Link

It shall work for you and also easier to implement as compared to toggling with the .htaccess file.

Hope this helps.

Regards!

Ankush

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines