Skip to content
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

Delete Handler in FilesRouter not being called on delete of Class #1360

Closed
mcclaskiem opened this issue Apr 4, 2016 · 4 comments
Closed

Comments

@mcclaskiem
Copy link

I currently have a Class with an image/file attached to it however, when deleting the object I am not seeing the deleteHandler called in FilesRouter.js. Is there something additional I need to do in order to notify the FilesRouter that a class has a file field attached to it?

@mcclaskiem mcclaskiem changed the title Delete Handler not being called on Class Delete Delete Handler in FilesRouter not being called on delete of Class Apr 4, 2016
@drew-gross
Copy link
Contributor

Unfortunately, Parse Server has no way of knowing if there is another object referencing the same file, so it can't safely delete the file. We don't currently have any solution in place for clearing out unreferenced files in Parse Server.

@mcclaskiem
Copy link
Author

Ok fair enough. So we need to manually call the deleteFile handler in our respective adapter at the same time we delete an object that contains it.

@drew-gross
Copy link
Contributor

Yep, if your particular application has a one file -> one object constraint, that should do it.

@mcclaskiem
Copy link
Author

Ok thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants