hello,
How I config this module to show pdf file that is privated.
tnks.

Comments

h.arefmanesh’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
shenzhuxi’s picture

Issue summary: View changes
Status: Active » Fixed

I think I fixed this issue. If I remember incorrectly, please re-open this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

anjjriit’s picture

Really sorry to re-open this issue.
Right now user can view my PDF files stored in private folder, but in my case if user accessed file directly from url, http://mysite/system/files/pdf-stored-in-private-folder.pdf.

When i use Private files download permission module, user can not access file directy frum url, but they are can not view my PDF also.

I do not know this is drupal issue or pdf issue.
Thank in advance

anjjriit’s picture

Status: Closed (fixed) » Active

Really sorry to about my wrong, I mean to re-open, but i post new comment in #4

zwerg’s picture

+1

shenzhuxi’s picture

Assigned: Unassigned » shenzhuxi
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

@anjjriit Do you mean:
http://mysite/system/files/pdf-stored-in-private-folder.pdf can be accessed, but pdf.js viewer doesn't work. (I just checked. Pdf module is working with private files.)
or
http://mysite/system/files/pdf-stored-in-private-folder.pdf can't be accessed, and pdf.js viewer doesn't work. (That's privat file/permission problem.)

zwerg’s picture

In my case (using private file system), pdf.js can show a private pdf file but the visitor can access it directly via url.

anjjriit’s picture

Thanks for @shenzhuxi

Yes you right When i use Private files download permission module,
http://mysite/system/files/pdf-stored-in-private-folder.pdf can't be accessed, and pdf.js viewer doesn't work. (That's privat file/permission problem.)

My goal when i used private folder are:
1. pdf.js viewer is work.
2. User can not access the file directly from url

I want to user only view file using pdf.js but do not allowed to download or access it directly from url.
Is it possible ?

Thanks

shenzhuxi’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

@anjjriit It's impossible. If users can view a file, they can access it.
You can try file viewer module which can convert pdf into png files.

shablm’s picture

@anjjriit, how did you solve this?

I have 'Private files download permission' module configured to let view/download pdf files to certain users only. This works well in my Test server, but not in live.
I mean, The module lets the users view the pdf based on the perm configured, but does not display the contents of the pdf.
I get "pdf document might not be displayed correctly" message in the browser.

How do I fix this?

SOLUTION: SELinux permissions was the issue in my case.