I created my content with a multi upload widget.When I delete my content ,I want to delete the group of images associated with content. I have successfully delete indivudual images when I use single upload widget but I can’t delete gruop images.Is there a short way to delete group and all images in it?
Probably there was a change in your API? Is it possible now to delete all files within a single request by groupID?
In my case multi file uploader is a part of the form. And when a user decides to cancel the form without submitting it I need to delete the files he/she has uploaded. What is the best way to do it on the frontend side?
Our API allows you to store all files in a group with a single request, though, and you might want to adjust your workflow to leverage this method. You could disable auto file storing in your project settings, and if a user submits the form, your app makes a request to store all files in the group. Otherwise, the uploaded files will be deleted automatically in 24 hours.
We use your frontend widget to upload files and then we just send the link to the backend to store it. If we change this flow we’ll need to update every single place on the backend where we work with your service to make an additional API requests to actually save files. Did I get it right? If yes, then it seems to be quite a big effort.
Yes, it would require changing the backend logic. Currently, you make multiple requests to delete the files that have been uploaded, but the form hasn’t been submitted. If you changed the workflow, you’d need to make a single request to store a filegroup if the form has been submitted.
Either way, deleting a filegroup with a single request seems to be a good idea for a feature request, so I’m moving this topic to #feature-requests. We’ll do some research to see if we can implement this in the next versions of the REST API.