Merge pull request #2 from TronoSfera/newDesign

test new design 03
This commit is contained in:
TronoSfera 2026-03-29 22:55:54 +03:00 committed by GitHub
commit 81eaaf9344
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2555,7 +2555,10 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__";
body: file, body: file,
}); });
if (!putResp.ok) { if (!putResp.ok) {
throw new Error("Не удалось загрузить файл в хранилище"); const errorText = (await putResp.text()).trim();
throw new Error(
`Не удалось загрузить файл в хранилище (${putResp.status}${errorText ? `: ${errorText.slice(0, 200)}` : ""})`
);
} }
const done = await api("/api/admin/uploads/complete", { const done = await api("/api/admin/uploads/complete", {
method: "POST", method: "POST",