Jake Vanderwerf
2026-01-28 8c6502de2f8ec2bd8382cd6945c327d7be400e14
assets/js/concise/UploadManager.js
@@ -1009,8 +1009,9 @@
      const processNext = async () => {
         while (queue.length > 0) {
            const file = queue.shift();
            results.push(await this.processImage(file, maxWidth, maxHeight));
            const entry = queue.shift();
            const blob = await this.processImage(entry.file, maxWidth, maxHeight);
            results.push({ uploadId: entry.uploadId, blob: blob });
         }
      };
@@ -1153,19 +1154,21 @@
      const otherEntries = uploadEntries.filter(e => !e.file.type.startsWith('image/'));
      // Process images in batches
      const processedBlobs = await this.processImages(
         imageEntries.map(e => e.file)
      const processedImages = await this.processImages(
         imageEntries.map(e => ({ file: e.file, uploadId: e.uploadId }))
      );
      // Update image uploads with processed blobs
      for (let i = 0; i < imageEntries.length; i++) {
         const { uploadId, upload } = imageEntries[i];
         upload.blob = processedBlobs[i];
         upload.fields.size = processedBlobs[i].size;
         upload.status = 'queued';
         await this.setUpload(uploadId, upload);
         processed++;
         this.updateFieldProgress(fieldId, processed, totalFiles, 'Processing files...');
      for (const { uploadId, blob } of processedImages) {
         const entry = imageEntries.find(e => e.uploadId === uploadId);
         if (entry) {
            entry.upload.blob = blob;
            entry.upload.fields.size = blob.size;
            entry.upload.status = 'queued';
            await this.setUpload(uploadId, entry.upload);
            processed++;
            this.updateFieldProgress(fieldId, processed, totalFiles, 'Processing files...');
         }
      }
      // Handle non-image files (no processing needed)