Commit Graph

17 Commits

Author SHA1 Message Date
Skystryder
72e8d9e1ce Cleaning up image conversions to use webp, and increasing the thumbnail size. 2023-01-28 17:46:03 -08:00
ThatOneCalculator
abf47e54f3
clean up w/ rome 2023-01-16 11:19:20 -08:00
ThatOneCalculator
7c2dabd047
no more eslint 2023-01-12 20:54:33 -08:00
ThatOneCalculator
6b00abf05c
refactor: 🎨 rome 2023-01-12 20:40:33 -08:00
ThatOneCalculator
8eecacec4f AVIF support 2022-11-14 18:53:38 -08:00
Johann150
e27c6abaea
refactor: temporary files (#8713)
* simplify temporary files for thumbnails

Because only a single file will be written to the directory, creating a
separate directory seems unnecessary. If only a temporary file is created,
the code from `createTemp` can be reused here as well.

* refactor: deduplicate code for temporary files/directories

To follow the DRY principle, the same code should not be duplicated
across different files. Instead an already existing function is used.

Because temporary directories are also create in multiple locations,
a function for this is also newly added to reduce duplication.

* fix: clean up identicon temp files

The temporary files for identicons are not reused and can be deleted
after they are fully read. This condition is met when the stream is closed
and so the file can be cleaned up using the events API of the stream.

* fix: ensure cleanup is called when download fails

* fix: ensure cleanup is called in error conditions

This covers import/export queue jobs and is mostly just wrapping all
code in a try...finally statement where the finally runs the cleanup.

* fix: use correct type instead of `any`
2022-05-25 16:50:22 +09:00
tamaina
12a3c6872f
enhance: ドライブに画像ファイルをアップロードするときオリジナル画像を破棄してwebpublicのみ保持するオプション (#8216)
* wip

* Update packages/client/src/os.ts

Co-authored-by: tamaina <tamaina@hotmail.co.jp>

* メニューをComposition API化、switchアイテム追加
クライアントサイド画像圧縮の準備

* メニュー型定義を分離 (TypeScriptの型支援が効かないので)

* disabled

* make keepOriginal to follow setting value

* ✌️

* fix

* fix

* ✌️

* WEBP

* aaa

* ✌️

* webp

* lazy load browser-image-resizer

* rename

* rename 2

* Fix

* clean up

* add comment

* clean up

* jpeg, pngにもどす

* fix

* fix name

* webpでなくする ただしサムネやプレビューはwebpのまま (テスト)

* 動画サムネイルはjpegに

* エラーハンドリング

* ✌️

* v2.2.1-misskey-beta.2

* browser-image-resizer#v2.2.1-misskey.1

* ✌️

* fix alert

* update browser-image-resizer to v2.2.1-misskey.2

* lockfile

Co-authored-by: mei23 <m@m544.net>
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>
2022-04-28 11:14:03 +09:00
syuilo
d1d68c0124 fix(server): dummy image is not served correctly
Fix #8393
2022-03-12 15:13:11 +09:00
syuilo
d071d18dd7
refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00
shibao
380d14f406
Add img-src and media-src to Content-Security-Policy header for files and media proxy (#8188)
* add img-src and media-src to csp in file and media proxy

* add csp changes to changelog

* sort and remove trailing semicolon
2022-01-29 02:23:18 +09:00
tamaina
7627c43dee
send-drive-file svg as png (#8107) 2022-01-20 03:05:52 +09:00
syuilo
57d994db0c Revert "revert d53795184"
This reverts commit aedbab17cc.
2022-01-01 22:25:30 +09:00
syuilo
aedbab17cc revert d53795184 2021-12-29 17:21:08 +09:00
syuilo
cfd1888969 refactor 2021-12-26 12:08:22 +09:00
syuilo
d53795184c enhance(server): better content type detection 2021-12-26 01:43:51 +09:00
syuilo
c69b72e199 fix lint 2021-12-09 23:58:30 +09:00
syuilo
0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00