medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.45k stars 2.4k forks source link

[medusa-file-spaces] Deleting image in admin doesn't delete from Spaces #1872

Open chemicalkosek opened 2 years ago

chemicalkosek commented 2 years ago

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

  1. Add image to product using Spaces plugin
  2. Save product
  3. Remove image
  4. Save product
  5. See image being removed from admin but not from Spaces

Expected behavior

Image is being deleted from Spaces after deleting in admin.

Wooody82 commented 2 years ago

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..

nehalahmadkhan commented 8 months ago

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,
amatosc commented 4 months ago

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?

amatosc commented 4 months ago

I guess that the same solution mentioned on #1468 applies here as well, although I have not tried it.

doc subscribers