medusa icon indicating copy to clipboard operation
medusa copied to clipboard

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

Open chemicalkosek opened this issue 3 years ago • 4 comments

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.

chemicalkosek avatar Jul 19 '22 11:07 chemicalkosek

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

Wooody82 avatar Sep 04 '22 18:09 Wooody82

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,

nehalahmadkhan avatar Dec 22 '23 09:12 nehalahmadkhan

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 avatar Apr 23 '24 14:04 amatosc

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

doc subscribers

amatosc avatar Apr 24 '24 08:04 amatosc