From your example ${BUCKET}.${REGION}.digitaloceanspaces.com/${OBJECT_KEY}
I’m storing directories that are a result of a ten-digit galleryID example: ${BUCKET}.${REGION}.digitaloceanspaces.com/32a0321241}
I thought this would work but it does not.
s3.delete(${BUCKET}.${REGION}.digitaloceanspaces.com/${galleryID}
, (error, data)=> {})
How can I send a delete request using the example above?
I am using nodeJS with KoaJS
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
I found the answer on StackOverflow for anyone interested.
Call it
Hello, @mrtonyq22
You can easily delete the directory from your DigitalOcean account as well.
Just navigate to the Space in your account and then click the “More” button and select Delete
https://docs.digitalocean.com/products/spaces/how-to/add-and-remove-files/
I personally use
s3cmd
to manage my Spaces due to the fact it is really user friendly. You can check this article in order to installs3cmd
https://docs.digitalocean.com/products/spaces/resources/s3cmd/
and check this mini tutorial on how to operate with
s3cmd
https://www.digitalocean.com/community/questions/how-to-manage-digitalocean-spaces-using-s3cmd
An example command with
s3cmd
to delete a directory:Hope that this helps Regards, Alex