Closed (fixed)
Project:
File Force Download
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2010 at 16:47 UTC
Updated:
20 Nov 2010 at 09:35 UTC
Hello,
I upgraded from 1.1 - 2.1 and noticed that when I upload a mp3 file forcing the download works like a charm. When I upload a pdf, image etc. it doesn't force -> it opens the image, document... inside the browser window. I tested it with formatters: file force: generic file and file force: url to file.
I use filefield 6.x-3.7 and filefield_paths 6.x-1.14.
Am I missing something?
Regards,
Stefan
Comments
Comment #1
arski commentedHey there,
Apologies for the delayed reply.
OK, well I can't seem to be able to reproduce your issue, so we need to find out what's going on. First of all, does the URL for the files you're trying to test look like yoursite.com/.../filename.pdf?download=1 ? If so, what browser are you using and are you sure you haven't set your browser to automatically deal in this way with some files - for example in FF when you open a file you get this popup where you can select to download/view a file, and a checkbox "do this automatically for files like this from now on". If you were to select "open" using the browser and then checked the box below there's nothing else file force can do.. hmm.. We can start with this and go on from there.
Cheers,
Martin
Comment #2
AdrianB commentedI'm have the same issue. Images (JPEG) and files (EPS) renders in Safari instead of being downloaded as expected, using "file force: url to file". And it's not an issue of the browser doing something odd, I've seen forced downloads of JPEGs in Safari from other sites.
Comment #3
arski commentedHey there,
OK, let's see if we can get to the bottom of this. First of all, could you answer the same question I asked above, namely if the URL for the files you're trying to test look like yoursite.com/.../filename.jpg?download=1 ?
If you could provide the actual link it would help a lot as well, if it's not private :)
Cheers
Comment #4
design.er commentedHello,
To answer your question, here is an URL where you can see the download link:
http://www.lifestylechurch.de/media/podcasts.html
It's the views generated "Download starten" link.
FYI: The DownloadFile module can force the download regardless the browser properties. Maybe it's interesting to take a look at its solution.
Anyway, your module is more accessible because you path is readable (DownloadFile's path is not.
Stefan
Comment #5
AdrianB commentedYes, "?download=1" was added to the URL. No, I can't provide a link because I'm moving forward fast today :) already turned off this module. I switched to this solutions which worked for me.
Comment #6
asb commentedIn my case it's more or less the other way around: I want to force mp3 files to download, but I'm not getting any new formatters in Views. Basically, File Force seems to do nothing at all, I'm using filefield with an audio widget.
Comment #7
arski commentedHey asb - what's an audio widget? Can't find it anywhere on Google.. is it just FileField with file extension restricted to .mp3 or something?
Comment #8
arski commented@design.er and others: I see that you links display as direct ones, i.e to sites/default/files.. with that, download=1 can never have an effect as the file retrieval is never sent through Drupal, but is managed directly by the server..
I thought I fixed this dependency before, but there seems to be an issue somewhere. For now, switching the download method in admin/settings/file-system to"private" will solve the issue and make the files force download.
I'll look into why it's not working by default in the meantime.
Comment #9
arski commentedFix committed, now you won't have to have the private download method setting selected.
@asb: do you mind starting a new issue for your thing, preferably with some more infos on the audio widget - thanks a lot!
Comment #10
asb commentedFollow-up issue, as requested: #964084: Additional formatters do not show up in Views
Comment #11
arski commentedJust rolled a release without private download method dependency. Sorry about the mismatch with the README.txt - the dependency was mentioned there before the last release, but somehow I removed that line, yet didn't remove it from the code. Should work either way now, enjoy.
Comment #12
design.er commentedHello, I just want to confirm that the new method works like a charm.
Thank you very much for your efforts and keep up the good work!
Stefan
Comment #13
PixelClever commentedI downloaded the 2.x dev version and from what I can tell the dependency on Private Files is still there, or at least it isn't forcing the download. This is an important issue, since changing the file settings in a working site is not recommended (especially when private files aren't actually wanted).
Comment #14
arski commentedok..well, what exactly are you doing where it's not working? what kind of link are you getting and what is the outcome.. can't help you without any information.
Comment #15
PixelClever commentedWell if in a view I add a field for a file and set it to fileforce generic files I get the following error when I click the resulting link:
Fatal error: Call to undefined function mime_content_type() in /sites/all/modules/file_force/file_force.module on line 87
I get the same error if I output the field as a url and enter the path in the browser:
http://localhost:8888/tomhauk/www/system/files/file_uploads/a81_g6.jpg?d...
Just adding the download=1 at the end of the normal file path results in the file opening rather than downloading.
Comment #16
arski commentedWell, missing mime_content_type function is clearly unrelated to the private download method.. You clearly have a completely independent issue, so please open a separate ticket for that.
As for adding download=1 at the end of the file, please refer to the latest (-dev) README.txt of the module, or http://drupal.org/node/265424 - the manual use is explained there in more detail.