Open file hook
- Dominant language
- Python
- Stars
- 46.7k
- Forks
- 1.9k
- Avg merge
- 9d 2h
- Merged PRs (30d)
- 4
Description
**is your feature request related to a problem? Please describe.**
I would like to open certain files in external programs,
like for example a docx in a onlyoffice document server,
or a jupyter notebook in jupyter, or a web-viewer for 3D models.
Or a WARC-replayer for web archives
**Describe the idea / solution you'd like**
When opening a file from the webui,
copyparty could invoke a hook,
which would then run some code -
likely requiring to make a share url of some sort to allow the external program to edit it.
Getting some sort of returned url and instructing the webui to open it in a tab.
I'm not sure how this would work with webdav or sftp and whatnot, maybe it'd be fine, as long as there are proper file-locks, but I'm not really sure if there are, there would have to be some way of marking file as busy, so the other interfaces won't try to write to it or something to that effect.
Related:
#423
Contributor guide
Research direction
Look at the file-opening logic in the webui, likely in the HTTP request handlers. The hook would need to generate share URLs and handle file locks. Check existing file-locking mechanisms in the codebase and see how other interfaces like WebDAV or SFTP interact with files. Review issue #423 for related context. The feature requires understanding the server's architecture to integrate external program launches and URL returns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100