neobooru / SzuruChrome

Chrome/Firefox extension which can import media from various sites into a szurubooru instance.
MIT License
39 stars 4 forks source link

Feature: make use of temporary file uploads #30

Closed phil-flip closed 2 years ago

phil-flip commented 2 years ago

For I while now, I was wondering why it takes so long to validate and as well upload the file. I noticed that the "temporary file" feature of szuru-booru is not used, making it inefficient and slow for big posts, potentially breaking the upload.

Please implement this function, upload to that first and then use the contentToken to validate (reverse-search) and upload. https://github.com/rr-/szurubooru/blob/master/doc/API.md#uploading-temporary-file

Thank you ^^

phil-flip commented 2 years ago

A little example I made here https://github.com/FlipperLP/fur-importer/blob/main/src/modules/booruHandle.ts Don't mind the messy code, I'm not a professional

neobooru commented 2 years ago

Implemented in 76d1b1e7687bf172321f4f34a2210de8d25bbbfb, will be included in the next release.