Merchant Profile image upload fails
Closed this issue · 0 comments
HoelShare commented
Currently it's not possible to upload an image via /merchant-api/v1/profile/media
Return:
{
"errors": [
{
"status": "500",
"code": "STOREFRONT__MEDIA_ILLEGAL_FILE_TYPE",
"title": "Internal Server Error",
"detail": "Type \"image\/jpeg\" of provided file is not allowed for images",
"meta": {
"parameters": {
"mimeType": "image\/jpeg",
"uploadType": "images"
}
}
}
]
}
The error is thrown by the Shopware\Storefront\Framework\Media\Validator\StorefrontMediaImageValidator
the UploadedFile->getExtension
(line Shopware\Storefront\Framework\Media\Validator\MimeTypeValidationTrait::14) Function returns empty string.