Page 1 of 1

PDF file open in Browser (not download)

Posted: 27 Sep 2018, 02:24
by amir00251
Hello,

I am trying to upload pdf files that could be open in a new tab inside the browser however, I have looked around and cannot find the right settings? Is it possible to do this in Phoca Download?

Does Direct Link settings relates to this problem? Yes or NO makes no difference to me.

Appreciate a bit of hint.

Thanks

Re: PDF file open in Browser (not download)

Posted: 29 Sep 2018, 12:02
by Jan
Hi,
Does Direct Link settings relates to this problem?
Yes, when you use direct link, you just add the link direct to the file and leave every control on user's browser. So then settings in browser decide how the PDF file will be displayed (in in page, another tab or as downloadable file)

When you don't use direct link, Phoca Download tries to force the displaying/downloading the PDF:

- so when downloading, Phoca Download set header of the document so browser will download it and not display
- when previewing, Phoca Download tries to open the file in browser (the same window, or popup), but this can be managed by browser so browser will not allow it.

So in the end, everything depends on browser options, but if they are default, the browser listens to server commands.

Jan

Re: PDF file open in Browser (not download)

Posted: 09 Oct 2018, 11:50
by thepianiste
Hi Jan

I have the same request, but my problem is that I use an "absolute path" (the files being subject to data protection, they must not be accessible directly via the Internet) and that currently it is not possible to point the previews in this folder in the control panel.

I think I can do a fork of the code and manually change, but after it will be problematic with the updates.

Esaïe

Re: PDF file open in Browser (not download)

Posted: 09 Oct 2018, 16:47
by Jan
Hi, see:
https://www.phoca.cz/documents/17-phoca ... tml-folder
https://www.phoca.cz/documents/17-phoca ... ng-folders

Files for download are stored in other folder than files for preview and play - because of the data protection
Jan