Let saved library stills queue Edit without a format rejection.
Use catalog width/height or aspect fallback in resolveRequestSize, restore GIF/BMP upload messaging, and keep Photo to change still ids across reload so Klein/Qwen Edit can bind imageAId. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,7 +7,7 @@ export default defineEventHandler(async event => {
|
||||
const {owner}=assertLibraryOwner(event),folderId=field('folderId')
|
||||
assertFolderAccess(event,folderId)
|
||||
const size=imageDimensions(image.data)
|
||||
if (!size) throw createError({statusCode:400,statusMessage:'Use a PNG, JPEG, or WebP'})
|
||||
if (!size) throw createError({statusCode:400,statusMessage:'Use a PNG, JPEG, WebP, GIF, or BMP image.'})
|
||||
const filename=image.filename!.split(/[\\/]/).at(-1)!
|
||||
const still=await saveStill({ownerKey:owner,folderId,filename,name:filename.replace(/\.[^.]+$/,''),data:image.data,...size,hideInput:field('hideInput')==='true',role:'input'})
|
||||
if (!still?.id) throw createError({statusCode:400,statusMessage:'Could not save that image to the library.'})
|
||||
|
||||
Reference in New Issue
Block a user