Closed (duplicate)
Project:
PDFPreview
Version:
7.x-2.1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2013 at 09:38 UTC
Updated:
18 May 2017 at 13:30 UTC
Jump to comment: Most recent
When you try to access generated files stored in private filesystem you get a 403 access denied error.
Tested on a stock Drupal 7.21 + pdfpreview 2.1.
If you set the default filesystem to private, even files uploaded in pubblic fields don't work, because the module sends them to the default filesystem.
I'm not sure what should be done here, I think the generated file should be somehow registered with the file_managed table, because otherwise it's not possible to access a file object.
Comments
Comment #1
NicolasZanotti commentedI have the same issue. I can see that the file is generated correctly in the file system. However, access is denied when called via /system/files/...
Comment #2
NicolasZanotti commentedI was able to work around this issue by installing the Private files download permission module and then allowing authenticated users to access the preview folder.
Comment #3
molenick commented+1.
Comment #4
A---- commentedThat's because you'd have to define a hook to allow access to your previews. Something along those lines :
It's also necessary for image styles as the original image access rights are check prior to thumbnail generation.
Comment #5
helmo commentedI think #2553845: Preview image should use same file system as that of its parent PDF has the patch for this ... marking as duplicate.
Comment #6
mschudders commentedI needed to hook #4 to fix this issue aswell.
Patch didn't solve my problem.
Use case:
Private file system
PDFpreview
File type => Manage display as PDF preview. (Not a Node)