HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Downloads are opening in associated program

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#105235 (In Topic #20519)
Avatar

Fan in training

Downloads section issue

Hi Everyone!

First off - I apologize as I know this must have been asked and answered plenty of times, however searching for it in numerous ways did not turn up anything.

In my Downloads section I have mp3 files.  When a user clicks download it will either start playing in the browser or it will open WMP or whatever program the user has associated with mp3s, rather than saving the file.  I found the option in the Content section under Downloads, and have the check box unchecked that says "use associated program rather than forcing to save".  This did not resolve the issue.

Has anyone encountered this before?  Any guidance would be greatly appreciated!

Thanks!
Back to the top
 
Posted
Rating:
#105237
Avatar

Community saint

Adding the following line to your .htaccess file will force mp3 files to download directly.

AddType application/octet-stream .mp3
Back to the top
 
Posted
Rating:
#105241
Avatar

Community saint

KingBast said

Adding the following line to your .htaccess file will force mp3 files to download directly.

AddType application/octet-stream .mp3
Normally yes, but not with ocPortal for security reasons as explained in View topic: Forcing an uploaded file to be downloaded and not played. - ocPortal.com ( unless things have changed in the last few years since I had a similar issue ).

The fix discussed in the link was for catalogues in v7.x.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#105242
Avatar

Fan in training

Perfect!  That did the trick.

Thank you so much...
Back to the top
 
Posted
Rating:
#105243
Avatar

Fan in training

temp1024 said

KingBast said

Adding the following line to your .htaccess file will force mp3 files to download directly.

AddType application/octet-stream .mp3
Normally yes, but not with ocPortal for security reasons as explained in View topic: Forcing an uploaded file to be downloaded and not played. - ocPortal.com ( unless things have changed in the last few years since I had a similar issue ).

The fix discussed in the link was for catalogues in v7.x.

In cPanel I have MIME Type, thats where I added the application/octet-stream .mp3 association and it worked!
Back to the top
 
Posted
Rating:
#105246
Avatar

Community saint

Glad it worked out for you, I wasn't sure if ocPortal would intervene when I posted that, not sure how (or where) it handles MIME types. Gonna go read that topic, maybe I'll find out :)
Back to the top
 
Posted
Rating:
#105247
Avatar

Community saint

bholmes said

In cPanel I have MIME Type, thats where I added the application/octet-stream .mp3 association and it worked!
Ok, so it seems like that ocPortal security layer doesn't apply to the downloads section.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#105249
Avatar

Community saint

Would have to try that line in the ocPortal .htaccess to find out for sure. I think if you enter stuff at a server level that ocPortal has no control over that. I don't often think, and when I do I am often wrong, but that's what I think :P
Back to the top
 
Posted
Item has a rating of 5 (Liked by KingBast)  
Rating:
#105250
Avatar

Fan in training

I appreciate the help guys!
Back to the top
 
Posted
Rating:
#105253
Avatar

temp1024 said

bholmes said

In cPanel I have MIME Type, thats where I added the application/octet-stream .mp3 association and it worked!
Ok, so it seems like that ocPortal security layer doesn't apply to the downloads section.

If it was added with an absolute URL rather than a direct upload, it'd do a redirect, and hence normal web server processing would apply. That's my guess.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: