parse-community / parse-server-s3-adapter

AWS S3 file storage adapter for Parse Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files are not deleted. They are hidden in BackBlaze Storage.

uzaysan opened this issue · comments

I'm using backblaze cloud storage. Its S3 compatible. File uploads are fine. But when I delete a file file is not deleted from bucket. Files become hidden. İs this expected behaviour?

How are you deleting the file?

I suspect this having to do with versioning and lifecycle rules on Backblaze S3.

My guess is that a deleted file is deleted in its current version but you can revert to the previous version to restore it.

@davimacedo

await Parse.Cloud.httpRequest({
          url: `http://myServerUrl/files/${filename}`,
          method: 'DELETE',
          headers: {
            'X-Parse-Master-Key' : 'MyMasterKey',
            'X-Parse-Application-Id': 'MyAppId'
          }
      });

After delete, files is not only hidden but there is a new version of file. For example

image.jpeg is my file. When I delete image.jpeg, there is a newly created file with the same name but its 0 bytes. Its also hidden

Here is an image from bucket
https://i.ibb.co/tYtkNrj/rsz-screenshot-from-2020-10-13-22-23-35.png

@mtrezza Yes. Its possible. Currently easiest workaround is creating a lifecycle rule for deleting hidden files.

Currently easiest workaround is creating a lifecycle rule for deleting hidden files.

To clarify for future readers: this is not a "workaround" in the sense of a "temporary fix". This is how Backblaze S3 is designed to work when versioning is enabled.

I'm closing this as it seems to be resolved. Feel free to comment if you have any questions and we can re-open this issue.