9001 / 9001/copyparty

Forcing download above a certain file size

オープン
#841 コメント 4 件 リアクション 1 件 担当者 1 名 @9001 が担当を希望しています GitHub で見る
enhancement
主要言語
Python
スター
46.6k
フォーク
1.9k
平均マージ
10日 16時間
マージ済み PR(30日)
5

説明

NOTE:
**please use english, or include an english translation.** aside from that,
all of the below are optional, consider them as inspiration, delete and rewrite at will

**is your feature request related to a problem? Please describe.**
For certain files, you don't want them shown in a web browser (example of my case, where I have a several gigabytes large archive of a Discord channel as an html file) and want to make the person download the files instead.

**Describe the idea / solution you'd like**
For those cases, it'd be nice to be able to specify in the configuration a maximum size where copyparty will attempt to show it (whether it is a video, image or html), and where starting this size it will use the `download` attribute in the `` tag to tell the browser to download it instead.

**Describe any alternatives you've considered**
I'm not sure there is another solution for these kind of cases, and it's to note that it's purely opt-in, since that feature would be disabled by default (you'd need to use it in the config).

**Additional idea**
You could be able choose different file sizes limits for different types of files, e.g. put a limit at 2GB for videos and 100MB for HTML files, or 4GB for mp4 and 1GB for AVI, etc. That's going beyond the base scope of the feature but it could be interesting.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。