Skip to content

Commit d36bc18

Browse files
Mary Hipppsychedelicious
authored andcommitted
only use client side uploads if more than one image to retain metadata for single uploads
1 parent 7878203 commit d36bc18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

invokeai/frontend/web/src/common/hooks/useImageUploadButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const useImageUploadButton = ({ onUpload, isDisabled, allowMultiple }: Us
8383
}
8484
} else {
8585
let imageDTOs: ImageDTO[] = [];
86-
if (isClientSideUploadEnabled) {
86+
if (isClientSideUploadEnabled && files.length > 1) {
8787
imageDTOs = await Promise.all(files.map((file, i) => clientSideUpload(file, i)));
8888
} else {
8989
imageDTOs = await uploadImages(

invokeai/frontend/web/src/features/dnd/FullscreenDropzone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const FullscreenDropzone = memo(() => {
109109

110110
const autoAddBoardId = selectAutoAddBoardId(getState());
111111

112-
if (isClientSideUploadEnabled) {
112+
if (isClientSideUploadEnabled && files.length > 1) {
113113
for (const [i, file] of files.entries()) {
114114
await clientSideUpload(file, i);
115115
}

0 commit comments

Comments
 (0)