only use client side uploads if more than one image to retain metadata for single uploads

This commit is contained in:
Mary Hipp
2025-05-19 15:46:50 -04:00
committed by Mary Hipp
parent 954fce3c67
commit 7fd8f39fd9
2 changed files with 2 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ export const useImageUploadButton = ({ onUpload, isDisabled, allowMultiple }: Us
}
} else {
let imageDTOs: ImageDTO[] = [];
if (isClientSideUploadEnabled) {
if (isClientSideUploadEnabled && files.length > 1) {
imageDTOs = await Promise.all(files.map((file, i) => clientSideUpload(file, i)));
} else {
imageDTOs = await uploadImages(

View File

@@ -109,7 +109,7 @@ export const FullscreenDropzone = memo(() => {
const autoAddBoardId = selectAutoAddBoardId(getState());
if (isClientSideUploadEnabled) {
if (isClientSideUploadEnabled && files.length > 1) {
for (const [i, file] of files.entries()) {
await clientSideUpload(file, i);
}