Replace file - does old file gets deleted when saving new on the same field?

As I noticed in the dashboard, there is a “replace” option when some file is already saved in an object field. Let’s say, FileObject has field file… When I would like to update the file with new data, do I need only to save FileObject with a new file and the old one gets automatically deleted from storage?

My question is mainly for Cloud code javaScript, but I am curious also about ParseSwift SDK…

No. The old file is not deleted from the storage because it may being used by other objects.

1 Like

Thank you for a quick response, I will build a logic for that in my app then.