uga buga kaka

This commit is contained in:
2026-07-15 18:27:45 +02:00
parent 3bbee6029f
commit d9b5b95f54
2 changed files with 26 additions and 1 deletions

View File

@@ -775,7 +775,14 @@ export const handleUpload = async (req, res, self) => {
manual_approval: manualApproval,
redirect: !manualApproval ? `/${itemid}` : null,
url: !manualApproval ? `${cfg.main.url.full}/${itemid}` : `${cfg.main.url.full}/`,
file_url: !manualApproval ? `${cfg.main.url.full}${imagesPath}/${filename}` : null
file_url: !manualApproval ? `${cfg.main.url.full}${imagesPath}/${filename}` : null,
// Fields for immediate client-side grid injection (avoids SSE race condition)
dest: filename,
mime: actualMime,
tag_id: effectiveRating ? (effectiveRating === 'sfw' ? 1 : (effectiveRating === 'nsfw' ? 2 : (cfg.nsfl_tag_id || 3))) : 0,
is_oc: !!is_oc,
display_name: req.session.display_name || null,
username: req.session.user
});
} catch (err) {