Needs review
Project:
Storage API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 Mar 2013 at 08:18 UTC
Updated:
17 Sep 2015 at 11:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Shevchuk commentedComment #1.0
Shevchuk commentedFixed similar issue link
Comment #2
jbrown commentedI think there should be a setting as it is often desirable to force download.
Ideally this setting would have eventual consistency where instances already created are modified to serve as configured, but Storage API doesn't yet have the infrastructure to handle this.
Comment #3
Shevchuk commentedWith this patch module is not forcing content disposition header, so it is up to the web server to output file properly, and this can be configured in the web server config (per location or server-wide). Of course, it would be nice to have an option within Storage API module, but for the meantime it seems better to me to behave consistently with Drupal itself.
Comment #3.0
Shevchuk commentedSpelling
Comment #4
jbrown commentedNote that with some cloud services, e.g. S3 it is not possible to configure force download container wide (to my knowledge).
Comment #4.0
jbrown commentedUpdated D7 patch status.
Comment #5
perignon commentedIs this still an issue. At over 2 years ago it's rather old. If this is still valid please reopen. The Storage API is under a lot of rework at the moment so contributions are welcome!
Comment #6
Shevchuk commentedDidn't test dev version, but from source code it seems this is still an issue, see http://cgit.drupalcode.org/storage_api/tree/storage.inc#n481 Probably module should provide administrator an option to force files download or not.
Comment #7
Shevchuk commentedComment #8
perignon commentedComment #9
jonhattanAlternative proposal: allow others to alter the headers to their own taste.
Comment #10
perignon commentedReviewing this. I think that the header "Content-disposition" is widely argued and not included in some of the HTTP specifications so it would be best to remove it. Thanks to @jonhatten for pinging this issue.
Comment #12
perignon commentedI have committed @jonhattan modified patch based off the patch provided by @Shevchuk. Please test dev branch.
Comment #13
jonhattanSorry I added this unrelated change inadvertently.
It is part of another patch I'm preparing for raising meaningful exceptions.
Comment #14
perignon commentedOopsie. I wondered for a second what that was for but was in a hurry and didn't see that it caused harm.
Comment #15
perignon commentedI just reverted that line back to what it was.
Comment #16
jonhattanThanks Perignon. Note two things:
* you also commited the patch file (actually there're two patch files in the repo)
* my patch in #9 doesn't include the change in #1, so content-disposition header is still there (in case you wanted to remove it -- i don't have an opinion here)
Comment #17
perignon commentedRemoved the patch files.
In regards to the header. Being it can be removed now via an alter, I am going to leave it in for now.