u
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user