Skip to content

Create FileObject database by default, and track file references in objects #7067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dblythy opened this issue Dec 13, 2020 · 1 comment
Closed
Labels
state:duplicate Duplicate of already reported issue type:feature New feature or improvement of existing feature

Comments

@dblythy
Copy link
Member

dblythy commented Dec 13, 2020

Is your feature request related to a problem? Please describe.
For my servers, I use an afterSaveFile trigger to create a class that I can use to track the files uploaded, so that I can moderate them via Parse Dashboard, as there are multiple classes / locations that reference files. In an afterSave trigger on these classes, if a file is removed, I decrement references on the FileObject class, so I can manually delete FileObjects with 0 references.

Describe the solution you'd like
Personally, I see inbuilt file tracking as a feature that should be inbuilt, so developers can be more aware of the content that is uploaded to their Parse Server. It could also allow for easier file cleanup (deleting unreferenced files to save storage space) by creating a simple script to delete FileObjects where reference count = 0.

Describe alternatives you've considered
Can already be supported via cloud triggers.

Additional context
-Clean up files
-Cloud code triggers

@mtrezza mtrezza added the type:feature New feature or improvement of existing feature label Dec 13, 2020
@mtrezza
Copy link
Member

mtrezza commented Dec 15, 2020

Thanks for suggesting.

I am closing this as it seems to be a duplicate of #6780. The solution you are proposing seems to be a variant of the solutions discussed there. The original issue seem to be the same, as to how to keep track of and delete unreferenced files.

There is an ongoing discussion about how to implement auto-deletion of unreferenced files and how a staged implementation could look like, see #6780 (comment).

If you think this is not a duplicate please feel free to comment and we can re-open this issue.

@mtrezza mtrezza closed this as completed Dec 15, 2020
@mtrezza mtrezza added the state:duplicate Duplicate of already reported issue label Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:duplicate Duplicate of already reported issue type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants