This commit is contained in:
seb
2026-09-29 13:45:13 +02:00
parent 4cb050c285
commit 43e1ab98b7
7 changed files with 193 additions and 91 deletions

View File

@@ -231,9 +231,11 @@ export default class ArticleImageSearchDialog extends PureComponent {
}
}
// 2. Upload AVIF to article
// 2. Upload photo to article
this.setState({ processingStep: 'Bild wird gespeichert...' });
const file = new File([avifBlob], 'article-photo.avif', { type: 'image/avif' });
const file = avifBlob instanceof File
? avifBlob
: new File([avifBlob], 'article-photo.webp', { type: avifBlob.type || 'image/webp' });
const res = await this.context.article.addImage(articleData.sku, file);
requireObject(res, 'POST /api/article/:sku/image');
requireObject(res.image, 'image');