Closed masteradhoc closed 2 years ago
Hi @masteradhoc
I believe this is the expected behaviour due to security reasons. See also: https://github.com/woocommerce/woocommerce/issues/24484#issuecomment-525904610
I am adding the needs developer feedback
label to this issue so that the Core team can confirm this.
Please note it may take a few days for them to get to this issue. Thank you for your patience.
@tammullen any feedback for us?
Hello @masteradhoc,
This error is ultimately being thrown by WordPress core in _wp_handle_upload()
, relevant lines here: https://github.com/WordPress/WordPress/blob/5.8-branch/wp-admin/includes/file.php#L904-L906
If this behavior is going to be changed, it should be in core.
Prerequisites (mark completed items with an [x]):
Describe the bug When trying to add images to products per API, Url’s for pictures which don’t have a file-extension don’t work. The images are valid JPG’s and can be viewed and downloaded by the browser. For example:
Expected behavior Image should be uploaded by woocommerce automatically without an error.
Actual behavior Error Message is shown when trying to upload the image over API.
Steps to reproduce the bug (We need to be able to reproduce the bug in order to fix it.) Steps to reproduce the bug:
Create or update article per API and insert a URL to a JPG-Image without file-extension:
You will get the error message:
Isolating the problem (mark completed items with an [x]):
WordPress Environment We use the WooCommerce System Status Report to help us evaluate the issue. Without this report we won't be able to fully evaluate this issue.