Closed (fixed)
Project:
FileField
Version:
6.x-3.0-alpha1
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2008 at 12:58 UTC
Updated:
30 Nov 2008 at 08:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
amitaibuI think it's a duplicate of #290199: 403 Error while downloading uploaded file
Comment #2
webchickI'm not sure this is the same bug as the original poster, but it seems closest from what I found in my searching.
For more info see this ImageField bug: #301888: Image previews fail to display with private files directory outside of web root.
With modules such as ImageField which derive from FileField, they get a 404 on download when private file access is enabled. This is because the logic in filefield_file_download() does an explicit check for type == 'filefield' and in the case of an imagefield it's type == 'image'.
This patch fixes the problem, but I'm marking needs work because it'd be better to have a more future-proof way of figuring out whether a given field type should be governed by filefield_file_download().
It's also possible this is a bug in that imagefield should be implementing its own hook_file_download(), but there's an awful lot of logic in that function that would be nice to not have to copy/paste per filefield-derived field type.
Comment #3
webchickOops. Patch.
Comment #4
dopry commentedthats a perfectly fine solution until the image field type is gone... It is deprecated. committed to HEAD