Preconditions and environment
- Magento version: 2.4.7-p3
- Anything else that would help a developer reproduce the bug: Just plain Magento REST API for products
Steps to reproduce
- Create a product through the admin without image.
- Use the REST API example below
- Magento says no.
Expected result
A dot within a filename should be perfectly fine.
Actual result
It's not fine :(
Additional information
REST API request:
{
"product": {
"sku": "YOUR_PRODUCT_SKU",
"media_gallery_entries": [
{
"file": "dir/filename.with.dots.jpg",
"label": "Anything",
"disabled": false,
"media_type": "image",
"position": "0",
"content": {
"base64_encoded_data": "YOUR_BASE64_DATA",
"type": "image/jpeg",
"name": "some_dir/filename.with.dots.jpg",
},
"types": [
"image",
"small_image",
"thumbnail"
]
}
],
}
}
REST API Response:
{
"message": "The image doesn't exist"
}
This response can be found in: Magento\Catalog\Model\Product\Gallery\Processor::addImage()::L157
https://github.com/magento/magento2/blob/2.4.7-p3/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php#L157
Release note
I've set it to S0 since this option is currently simply not allowed which will result in invalid automated synchronizations between Magento and other systems.
Triage and priority
Preconditions and environment
Steps to reproduce
Expected result
A dot within a filename should be perfectly fine.
Actual result
It's not fine :(
Additional information
REST API request:
{ "product": { "sku": "YOUR_PRODUCT_SKU", "media_gallery_entries": [ { "file": "dir/filename.with.dots.jpg", "label": "Anything", "disabled": false, "media_type": "image", "position": "0", "content": { "base64_encoded_data": "YOUR_BASE64_DATA", "type": "image/jpeg", "name": "some_dir/filename.with.dots.jpg", }, "types": [ "image", "small_image", "thumbnail" ] } ], } }REST API Response:
{ "message": "The image doesn't exist" }This response can be found in:
Magento\Catalog\Model\Product\Gallery\Processor::addImage()::L157https://github.com/magento/magento2/blob/2.4.7-p3/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php#L157
Release note
I've set it to S0 since this option is currently simply not allowed which will result in invalid automated synchronizations between Magento and other systems.
Triage and priority