PiRSquared17 / mp3-browser

Automatically exported from code.google.com/p/mp3-browser
GNU General Public License v2.0
0 stars 0 forks source link

Cannot download #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open page with mp3 Browser in Chrome
2. Click download icon

What is the expected output?
- Download

What do you see instead?
- Playback in new tab

Joomla 3.3.1, mp3 Browser 0.3.1

See #36

Happening in Chrome and Firefox. Not sure if this is a regression on the end of 
the plugin or a progression of these browsers.

Original issue reported on code.google.com by sanderverh on 17 Jun 2014 at 3:54

GoogleCodeExporter commented 9 years ago
Also happens in Safari 7.0.4

Original comment by des...@timmyerson.com on 22 Jun 2014 at 11:18

GoogleCodeExporter commented 9 years ago
Any update on this? I'm back trying to get this to work.

Original comment by deron.sp...@gmail.com on 25 Jun 2014 at 10:55

GoogleCodeExporter commented 9 years ago
Looks like we need to find somewhere to set the content disposition. I tried 
.htaccess but that breaks the player so it needs to be done for the plugin only 
on the download link. One way is to have a script that the download links point 
to which can figure out which file to serve up based on the parameters sent. 
The content disposition can be set as a part of that response. Don't know much 
about joomla plugins. Would this solution be possible giving the constraints 
presented in a plugin?

Original comment by deron.sp...@gmail.com on 25 Jun 2014 at 11:27

GoogleCodeExporter commented 9 years ago
Thanks for looking into this so far. I am not at this very moment focused on 
this project, but if you come across a solution, I'd be happy to add that to 
the distribution of this plugin. If I have to look into it myself it may take 
just a little bit longer than what you're hoping for, since I'm only an 
incidental plugin developer and PHP user, and it'd take me some time which I'm 
currently spending on other projects.

Original comment by sanderverh on 25 Jun 2014 at 2:55

GoogleCodeExporter commented 9 years ago
Issue 43 has been merged into this issue.

Original comment by sanderverh on 22 Aug 2014 at 8:21

GoogleCodeExporter commented 9 years ago
Any progress on this?

Original comment by jmckean...@gmail.com on 19 Sep 2014 at 4:07

GoogleCodeExporter commented 9 years ago
I can't download still. Doesn't work. 

Be Blessed,

George Sickler
www.coloradodv.com
(970)-443-3762

Original comment by geosick...@gmail.com on 19 Sep 2014 at 4:22

GoogleCodeExporter commented 9 years ago
Highly untested, but would anyone give this a spin?

Change mp3browser/html/HtmlDownloadColumn.php

Change this line:

$html .= "<a href=\"" . $data->getUrlPath() . "\" title=\"Download Audio File\" 
target=\"_blank\" class=\"jce_file_custom\">";

Into this:

$html .= "<a href=\"" . $data->getUrlPath() . "\" title=\"Download Audio File\" 
target=\"_blank\" class=\"jce_file_custom\" download=\"" . $data->getFileName() 
. "\">";

Change mp3browser/MusicItem.php:

Add the following function (at the end or so, just before the last "}" of the 
file):

    public function getFileName() {
        return $this->fileName;
    }

Original comment by sanderverh on 19 Sep 2014 at 4:44

GoogleCodeExporter commented 9 years ago
I'll try it. 

Be Blessed,

George Sickler
www.coloradodv.com
(970)-443-3762

Original comment by geosick...@gmail.com on 19 Sep 2014 at 4:46

GoogleCodeExporter commented 9 years ago
Works for me...

Original comment by jmckean...@gmail.com on 19 Sep 2014 at 5:13

GoogleCodeExporter commented 9 years ago
I should say works with Chrome and Firefox - Chrome automatically downloads to 
default download folder and Firefox brought up a dialog box that gave option to 
Open with... or Save File.

IE still opens new tab and played with Quicktime...

Havent tried Safari...

Original comment by jmckean...@gmail.com on 19 Sep 2014 at 5:18

GoogleCodeExporter commented 9 years ago
I have made the changes and it works well, as described above, in Firefox and 
Chrome but the issue remains in Safari - the link opens a new window or tab and 
the file auto-plays. 

I have yet to get hold of a Windoze machine to see what happens in IE - anyone 
know?

Original comment by des...@timmyerson.com on 20 Sep 2014 at 9:25

GoogleCodeExporter commented 9 years ago
Oops! I should read more carefully -  #11 jmckean has noted that the issue 
remains in IE too. Hummmm - this is outside my ability to fix, so I hope 
someone can assist as it's a great module otherwise and deserves to be widely 
used.

Original comment by des...@timmyerson.com on 20 Sep 2014 at 9:28

GoogleCodeExporter commented 9 years ago
I am on Joomla 3, is this even compatible? 

I can't get it to work. I upgraded my system all the way from j1.5 to the new 
j3.3 

How do I clean out all of the old files to try to install a new versions?

Anytime I try to play the file nothing happens, it shows up with a    0|0    in 
the area it usually shows the playback bar, 

Then the download goes to a page, but does not include the proper URL it just 
goes to the folder media// <- it ads an extra / as well - 

I am thinking it just wont work with j3???

Please help...

Original comment by geosick...@gmail.com on 24 Sep 2014 at 7:36

GoogleCodeExporter commented 9 years ago
It should work.

Is it just the downloading that doesn't work?

Do you have a live URL to take a look?

Original comment by sanderverh on 24 Sep 2014 at 7:44

GoogleCodeExporter commented 9 years ago
Hi (#14) geosick
It's not the Joomla install that's causing you grief - I've had it working on 
J3.3.3 and have just successfully updated that to J3.3.4 with no problems.

What browser are you using to view your website?

Original comment by des...@timmyerson.com on 24 Sep 2014 at 7:45

GoogleCodeExporter commented 9 years ago
I'm looking at an original install of the mp3 Browser plugin and it has no 
issues with IE11. It just downloads like it always did.

Original comment by sanderverh on 24 Sep 2014 at 7:49

GoogleCodeExporter commented 9 years ago
What do you mean by 'an original install'?  I have version 0.3.1 with the code 
modifications you posted on the 19th September. I've just tried with the latest 
version of Safari on my Mac and no joy, the download link opens a new page with 
a player. Firefox and Chrome are still working though!

I don't have IE available at the moment but I can check that shortly and report 
back. 

Original comment by des...@timmyerson.com on 24 Sep 2014 at 7:56

GoogleCodeExporter commented 9 years ago
Okay, Safari I have no access to. I was just saying that IE (IE11 specifically) 
didn't suffer from the "problem" to begin with. The "problem" is a progression 
in how browsers deal with these links. It used to work for all browsers, 
previously, is my understanding. More work to do then.

Original comment by sanderverh on 24 Sep 2014 at 8:15

GoogleCodeExporter commented 9 years ago
Interestingly I just got my son to access the page using IE11 on a Windows 7 
machine and he got the problem - the files just play, they do not download.

If you can find the fix that would be great as I really rate the extension - 
just can't use it (yet)!

Original comment by des...@timmyerson.com on 25 Sep 2014 at 11:29

GoogleCodeExporter commented 9 years ago
http://isnrconference.org/index.php?option=com_content&view=article&id=70

Here is my page that shows what the issues are for me. I have installed quite a 
few times, and have no luck with playback or download.

Original comment by geosick...@gmail.com on 25 Sep 2014 at 4:50

GoogleCodeExporter commented 9 years ago
There is ONLY 1 way to do this to have it download 100% of the time....put it 
in a zip file...flat out there there is no other way folks...been there done 
that thing. You can change headers all day long but it still doesn't work 100% 
either. You could try putting this in htaccess as a work around....really a 
better plan than hard coding it and then updating later and then you forget.
<FilesMatch "\.(?i:mp3)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>
Hope that helps

Original comment by gojoe_go...@yahoo.com on 25 Oct 2014 at 1:29

GoogleCodeExporter commented 9 years ago
I recently had to implement something similar using Java, and the solution 
there was using the Content-Disposition header (after re-reading my comment I 
notice that you also mentioned this). This is not a Java-specific solution, it 
is something in HTTP, if I'm not mistaken, but it would require backend code 
(PHP) to serve up the file, being able to set the Content-Disposition header 
while doing so. At the moment (I believe) we're just pointing to the direct 
download URL for the MP3 in question and letting the HTTP server deal with it. 
(This is why your FilesMatch solution could very well work, but it is not a 
nice "out of the box" solution. Did you test it?)

Here's an example of how to code that in Joomla: 
http://docs.joomla.org/Generating_JSON_output

(The example is for application/json, but same difference.)

Original comment by sanderverh on 29 Oct 2014 at 4:47

GoogleCodeExporter commented 9 years ago
I tested it and it works every time. It is surely not an out of the box item 
for sure. Some folks don't use htaccess and implementing it for some might be 
an issue, works for me though

Original comment by gojoe_go...@yahoo.com on 2 Nov 2014 at 7:01

GoogleCodeExporter commented 9 years ago
I'm not able to play the mp3 files
and I can't download them neither...

Joomla is 3.3

website:  http://tpbel.vented.hol.es/

Original comment by positiv...@gmail.com on 17 Nov 2014 at 7:56