Active
Project:
Private Upload
Version:
6.x-1.0-rc3
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2007 at 04:15 UTC
Updated:
12 Apr 2012 at 14:08 UTC
While troubleshooting 197154 I noticed that Private Upload does not alter the "File attachments" fieldset added to comment forms by Comment Upload. Files are attached successfully but the user isn't presented the "private" checkbox to toggle public/private state of the attachment.
Comments
Comment #1
starbow commentedComment #2
starbow commentedChanging from bug to feature request.
Comment #3
Rosamunda commented+1
Comment #4
tobias commented+1 this would be an important addition to a great module. Thanks!
Comment #5
rimu commentedDrupal 6:
I made all files attached to comments (Comment Upload module) private by using doing this:
and then added this hook in a custom module
NB this code assumes that comment files are always private, there is no option to have them public. If the node that the comment is in reply to is public then the attachment might be, I haven't tried that out though.
Comment #6
ankheg commentedThanks, rimu. Your solution works great.
Comment #7
baysaa commentedThanks rimu, your solution works, but note/heads up for people using it, your comment's attachment download link will still be pointing directly to the actual file, and not the 'private' file system as it should. I had to add another section to the above hook_comment() on rimu's post checking $op == 'view', implement a preprocessor for theme_comment_upload_attachments, and also had to hack comment_upload module a bit :(
If anyone has a better solution please share.
and on comment_upload.module around line 399 in function comment_upload_comment_view comment out the line:
otherwise you'll get 2 attachment tables