Page 1 of 1

Open file in preview mode using file URL

PostPosted:Tue May 30, 2023 6:55 am
by nishant8900
Hi,
I am using OpenKM 6.3CE using LDAP AD for user authentication. Both users and roles are getting fetched from AD.
i am trying to open a file in Current view (opens a file in new tab)

i tried to use the below url to open the file in new tab, but it is asking for login credentials
Code: Select all
http://[base url]:[port]/OpenKM/preview/pdfjs/web/viewer.html?file=%2FOpenKM%2Ffrontend%2FConverter%3FtoPdf%3Dtrue%26inline%3Dtrue%26uuid%3D21567dc94-3120-43ad-b07d-b475e3a4591a3#page=1&zoom=auto,-1244,626
whenever i click the above link it should open the file in view mode in new tab

Can i do something to open the specific file without entering login credentials or is there any way to pass the credentials in the url itself so that the file gets open in new tab?

Regards

Re: Open file in preview mode using file URL

PostPosted:Tue May 30, 2023 11:53 am
by jllort
Take a look in the regular preview how the parameters are passed to the OpenKM to preview documents and then try to reply the same format, I suspect you are not using the same format.

When talking about the new tab -> I suppose this is a new tab in the OpenKM application, right?

Re: Open file in preview mode using file URL

PostPosted:Fri Jun 09, 2023 6:11 am
by nishant8900
Hi,
I have checked the format and tried with that as well but it is routing to login page.
when i enter the below mentioned url:
http://[base url]:[port]/OpenKM/frontend/Converter?toPdf=true&inline=true&uuid=f6dbf-7522-4bad-8jkh6d0-6f6c8

it opens the main login page, when i login then it opens the preview page correctly.
But I want to open that preview mode without logging in. It should be like, i click on the above link and file opens in basic preview mode without asking me login credentials
since i want to use the above url through a webpage i created to access the file.
i want to know if it is possible to acheive the above requirement without entering login credential. i just want to preview file, nothing else
please let me know how can i achieve this without logging in everytime.

Regards,

Re: Open file in preview mode using file URL

PostPosted:Fri Jun 16, 2023 11:34 am
by jllort
Accessing the documents without any kind of login will be a security break. In this scenario, you should create a small application in the front with REST API and login in the background to get the document