adding parallel file computing for better api performance and upload speed and responses

This commit is contained in:
2026-07-12 17:15:59 +02:00
parent d424b24221
commit 8bb9a14773
3 changed files with 112 additions and 92 deletions

View File

@@ -846,6 +846,11 @@ export default router => {
return res.status(404).reply({ body: 'No API key — generate one first in Settings.' });
}
// Determine a safe default rating for the ShareX config.
// In shitpost mode the server accepts uploads without a rating, but
// we still send 'sfw' so the item gets a rating tag by default.
const defaultRating = 'sfw';
const sxcu = {
Version: '15.0.0',
Name: cfg.main.url.domain,
@@ -857,7 +862,14 @@ export default router => {
},
Body: 'MultipartFormData',
FileFormName: 'file',
// The server requires a rating field. Without it every upload is rejected.
// Users can change this value in ShareX's custom uploader settings.
Parameters: {
rating: defaultRating
},
// $json:url$ maps to the `url` field in the success response JSON
URL: '$json:url$',
ThumbnailURL: '$json:url$',
ErrorMessage: '$json:msg$'
};