medusa
medusa copied to clipboard
[medusa-file-spaces] Deleting image in admin doesn't delete from Spaces
Bug report
Describe the bug
When deleting image from product in admin, the connected image is not removed from Digital Ocean Spaces
System information
Medusa version (including plugins):
"@medusajs/medusa": "^1.3.4",
"medusa-file-spaces": "^1.2.3",
Admin is latest version
Steps to reproduce the behavior
- Add image to product using Spaces plugin
- Save product
- Remove image
- Save product
- See image being removed from admin but not from Spaces
Expected behavior
Image is being deleted from Spaces after deleting in admin.
I think if the images has space that would be a problem as well.. So maybe add some kind of image name check when we do upload ... change space to dash maybe..
It also does not work with medusajs/file-local as well as medusa-file-s3 Uploading an image that has no spaces in its name dosen't work either. My versions
@medusajs/medusa: 1.18.0,
@medusajs/file-local: ^1.0.2,
medusa-file-s3: ^1.4.0,
Hey!
It actually happens with any plugin/file service as the delete method is never called. Is this planned to be fixed? Is there a workaround?
I guess that the same solution mentioned on #1468 applies here as well, although I have not tried it.