mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): support resize_to when uploading images
This commit is contained in:
@@ -270,12 +270,15 @@ export const imagesApi = api.injectEndpoints({
|
||||
},
|
||||
}),
|
||||
uploadImage: build.mutation<ImageDTO, UploadImageArg>({
|
||||
query: ({ file, image_category, is_intermediate, session_id, board_id, crop_visible, metadata }) => {
|
||||
query: ({ file, image_category, is_intermediate, session_id, board_id, crop_visible, metadata, resize_to }) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (metadata) {
|
||||
formData.append('metadata', JSON.stringify(metadata));
|
||||
}
|
||||
if (resize_to) {
|
||||
formData.append('resize_to', JSON.stringify(resize_to));
|
||||
}
|
||||
return {
|
||||
url: buildImagesUrl('upload'),
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user