Closed (won't fix)
Project:
Private Upload
Version:
5.x-1.0-beta2
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2007 at 22:14 UTC
Updated:
18 Dec 2007 at 01:52 UTC
When an attached file is listed in a post (or a Views table view lists files attached to posts) the path to the private file looks like example.com/files/private/etc and Apache returns a 403 error. When editing a node with a private attachment, the full URL is shown example.com/system/files/private/etc and works as expected.
This was tested with beta2 on Drupal 5.2 and 5.3.
Comments
Comment #1
starbow commentedCan you tell me how you are listing the file in the post?
As for views, that is a good point. I will need to provide a custom view handler.
Comment #2
Christefano-oldaccount commentedThanks for the response. The upload module lists the node's attachments in an "Attachments" table (I think it has an "attachments" id in the page source, too). These attachments are uploaded the normal way from the "File attachments" field in a node edit/create form. Clicking a private attachment should download it but the path is missing the system/ part of the URL.
Having private and public functionality in Drupal is critical. I'm very grateful that you're working on the problem.
Comment #3
starbow commentedHmm, well the module should be rewriting the links in the attachment table. And on my test system it works.
Can you go into the code of the module, and edit line 549 in theme_private_upload_attachments from
to
and then post what shows up in your message box?
Comment #4
Christefano-oldaccount commentedThere are a few things going screwy and I'm wondering how to step back and effectively help troubleshoot this issue. I'll post again after I take a look at what other modules are installed.
Comment #5
Christefano-oldaccount commentedOK, you'd never guess it was the Upload Image module. Disabling Upload Image fixes the reported issue.
With Upload Image enabled, the Private Upload paths get screwed up when making an upload private (by checking the "private" checkbox in the "File attachments" fieldset). The funny thing is that in this test the attachment being uploaded isn't even an image.
edit: I'm opening a few new issues to report other conflicts I observed.
Comment #6
Christefano-oldaccount commentedComment #7
starbow commentedI will add this to the list of known issues.
Comment #8
starbow commentedHmm, actually I cannot find an Upload Image module. Can you let me know the URL?
Comment #9
Christefano-oldaccount commentedSure, it is at http://drupal.org/project/upload_image
Comment #10
starbow commentedComment #11
starbow commentedI don't think there is anyway to get this module to play nicely with other modules that re-theme the file attachments.
Comment #12
Christefano-oldaccount commentedThanks for looking into it. Private Upload is staggeringly useful and I wish I'd started using it in a particular project before committing to Upload Image.