Closed (works as designed)
Project:
File Force Download
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2012 at 08:53 UTC
Updated:
10 Jul 2012 at 18:28 UTC
Any chance of support for uploaded txt, html files?
I`m using file force download for a list of documents, it works perfect for all the files execpt for files that the browser can read as default like txt, html,..
Thanks
Tim VS
Comments
Comment #1
arski commentedHi, first of all, the status "needs review" is for when you upload a patch and need others to review it.
Other than that, I just tested it on my site, and the force download works perfectly for .txt and .html files as well. I'm guessing that your browser is simply ignoring the HTTP headers for those file types, especially if you say it works for other file types. (Although maybe it's a coincidence that it works for others..)
Can you post an URL to a jpg file where the force download works, and an URL to the txt file where it doesn't work (you can hide the domain name, not interested in that). Both those links should be going through the private file system (i.e. have something like system/files and NOT sites/all/files..) and the download=1 parameter at the end.
Cheers
Comment #2
lee20 commentedI have this same issue, the URL for the file is not using the "system/files" path but has the download=1 parameter at the end.
Does the file field need to be set to use the private file system?
Comment #3
arski commentedyes, it's as simple as this: if the URL says "sites/all/../files/myfile.jpg" then the web server will directly fetch the file without ever touching any Drupal bits. So there is simply nothing any module will be able to do with such links (apart from doing some hacking around with the server setup.. which we'll never be doing).
So short answer: yes, you need private file system enabled for the module to work (it's pretty clearly stated in the README).
Closing for lack of followup from OP.
Comment #4
lee20 commentedMy question wasn't whether or not the private file system needed to be enabled but more specifically:
Must the file (or image) FIELD be configured to save to the private file system?
Comment #5
arski commentedisn't that the same really? yes, your files need to go through the private file system (field-specific setting or global..) if you want to use file force.