-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PUT /V1/products/:sku/media/:entryId does not change the file #22424
Conversation
Hi @Nazar65. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @rogyar, thank you for the review. |
✔️ QA Passed |
PUT is idempotent, so I do not 100% agree with this fix as it creates a new entity with a new ID which prevents the same requests being called again. |
@philippsander this fix does not create new entity, just updates entity id, as this worked before, i'm just added case with base64 encoded data |
ok. but still not idempotent ;-) |
Hi @Nazar65, thank you for your contribution! |
Description (*)
When update product image via Api image not replaced because $entry->getFile() return null.
Fixed Issues (if relevant)
Manual testing scenarios (*)
base64_encoded_data is empty as this would bloat the issue-text
{"entry":{"media_type":"image","label":"Label for my Image":1,"disabled":false,"types":["image","small_image","thumbnail"],"content":{"base64_encoded_data":"...","type":"image/jpeg","name":"luma-yoga-kit-2"},"id":52}}
Contribution checklist (*)