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
2022-03-08 23:23:18 +09:00
2022-05-14 18:50:16 +09:00
2022-05-18 01:12:00 +09:00
2021-09-04 17:54:24 +09:00
2017-05-24 20:27:39 +09:00
2019-08-18 14:41:33 +09:00
2021-11-12 02:02:25 +09:00
2021-09-04 17:54:24 +09:00
2022-04-23 12:37:44 +09:00
2018-11-04 11:08:46 +09:00
2018-08-13 00:24:45 +09:00
2021-04-17 17:35:44 +09:00
2017-06-17 10:01:05 +09:00
2022-05-22 14:49:53 +09:00
2021-05-30 20:52:39 +09:00
2021-10-28 17:12:57 +09:00
2022-05-15 22:22:06 +09:00
2018-03-28 22:56:28 +09:00
2022-05-15 22:22:06 +09:00
2019-04-05 18:17:30 +09:00
2022-05-24 08:10:00 +02:00
2022-03-28 13:38:05 +09:00
2021-05-24 05:50:45 +09:00

Misskey logo

🌎 Misskey is an open source, decentralized social media platform that's free forever! 🚀


find an instance create an instance become a contributor join the community become a patron

Features

  • ActivityPub support
    Not on Misskey? No problem! Not only can Misskey instances talk to each other, but you can make friends with people on other networks like Mastodon and Pixelfed!
  • Reactions
    You can add emoji reactions to any post! No longer are you bound by a like button, show everyone exactly how you feel with the tap of a button.
  • Drive
    With Misskey's built in drive, you get cloud storage right in your social media, where you can upload any files, make folders, and find media from posts you've made!
  • Rich Web UI
    Misskey has a rich and easy to use Web UI! It is highly customizable, from changing the layout and adding widgets to making custom themes. Furthermore, plugins can be created using AiScript, an original programming language.
  • And much more...

Sponsors

RSS3
Description
No description provided
https://m.moec.top/
Readme 172 MiB
Languages
TypeScript 63.7%
Vue 29.4%
JavaScript 6.2%
SCSS 0.3%
Pug 0.2%