Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
MIT License
42.12k stars 3.33k forks source link

Feature Request: URLs to directly link to "view-pdf" a specific file #1004

Open ASAujla opened 5 months ago

ASAujla commented 5 months ago

I want to create a link that will open ":/view-pdf", but I want it to open a specific file on my network, rather than the default "Welcome to Stirling PDF Reader using PDF.js" file.

Apologies if this is already possible, I couldn't find a way to do it.

sbplat commented 5 months ago

Like embedding the path of the file to the URL so it loads that file?

ASAujla commented 5 months ago

Yep, don't know how it would work, but something like this: _http://:/view-pdf?file=_

sbplat commented 5 months ago

The idea would be fine if it was all client sided. Since this is a server sided feature, clients can directly access files from the server which is probably a security concern. We could, however, set up a watch folder like the one from pipelines (so file access is limited).

ASAujla commented 4 months ago

Hi, sorry for the delay... I'm not familiar with Pipelines as I'm quite new to Stirling PDF. Sounds interesting, though!

oytuntez commented 2 months ago

@sbplat I think a more comprehensive and feature-like approach here would be:

This would make Stirling not a PDF editor, but an embeddable PDF editor.

oytuntez commented 2 months ago

After some codebase exploration, just wanted to say this can also be done via the front UI/JS. Download the given URL (via query parameters, imagine a temporary file url given by external system) and use it in file inputs for various operations. When they are done, POST the file to a given external endpoint (possibly with all query parameters in the original request).