9001 / 9001/copyparty

Uploading an URL shortcut

Aperta
#521 0 commenti 0 reazioni 1 assegnatario Rivendicata da @9001 Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
46.6k
Fork
1.9k
Merge medio
10g 16h
PR unite (30g)
5

Descrizione

Hi !
First of all, thanks for this amazing piece of software.

**Some context** (feel free to skip)
A few days ago, I wanted to host my own cloud, and installed OCIS (OwnCloud Infinite Scale), but since copyparty seems better for my use case, I'm going to replace it.
With OCIS, there's a feature that allows one to upload an URL instead of a file. This is handy since I host and want to share ressources about computer science, including youtube videos. They handle this by using a .url file. I believe that they manually handle the redirection on the web client. However, it doesn't work well when browsing through WebDav : those files aren't supported by default on Linux, neither they are on Android / iOS.
A way to do so that's widely supported on every operating system is simply by using a `.html` that redirects to the desired URL. The most common way is through a `` tag, but _no need for JavaScript_; the refresh meta http-equiv attribute does that by default, and it even works through WebDav since HTML files are handled by the browser.

**Describe the idea**
Allowing an user to share an URL shortcut (follows the link when clicked). It would take the following form:
inputs: `<name>` and `<some-url>`
output: write the following in `<name>.html` (if the file doesn't exist yet obviously):
```html
<meta http-equiv="refresh" content="0; url=<some-url>">
```
Since HTML files are currently directly rendered upon click, the redirection is immediate, so copyparty wouldn't have to manually handle anything.

**Describe any alternatives you've considered**
An issue would be to be able to distinguish between an HTML file that was uploaded as HTML, and some HTML file that was created specifically for sharing a single link.
My first idea would be to specify this by using `<name>.url.html`, or something similar that would make it more obvious that the HTML file actually only holds an URL.
This would maybe allow the UI to make it more obvious as well (by changing the file color, or adding an icon ?), but I feel like this may not match with copyparty's current philosophy.

**Additional context**
I thought it would be a cool feature, but I'll understand if this seems too specific of a use case haha.
This is also to make people aware that the `<meta http-equiv="refresh">` attribute really works well for this use case and with the way copyparty handles HTML files.

edit: typo

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.