1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

fix(storages): an ISO chunk answered with an HTML page is not counted as stored

When the host did not answer, the storage page redirected the chunk's
POST to the pools page; the upload took that HTML as a stored chunk, and
on the last one closed as finished without an error. The chunk request
now expects JSON, so such an answer shows the upload error and the
upload can be resumed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-09 14:32:07 +03:00
parent 7625b327c4
commit 03dcb14e45

View file

@ -107,6 +107,9 @@ $(document).ready(function() {
data: formData,
processData: false,
contentType: false,
// anything else is not a stored chunk: a redirect to an HTML page (the host did
// not answer, the session ended) is an error, not a success
dataType: 'json',
success: function(data) {
if (chunkIndex === 0) {
// the job panel follows the upload from here