Skip to content

Support for staged PFFiles in Local Datastore #560

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
nlutsenko opened this issue Nov 14, 2015 · 3 comments
Closed

Support for staged PFFiles in Local Datastore #560

nlutsenko opened this issue Nov 14, 2015 · 3 comments
Assignees
Labels
type:feature New feature or improvement of existing feature

Comments

@nlutsenko
Copy link
Contributor

Even though you can pin PFObjects to Local Datastore, all unsaved PFFiles are not persisted across runtimes of the application.
This issue is for tracking/discussing potential support for this as well as tracking implementation progress.

There are multiple reasons why this is not been implemented so far, including:

  • The only unique identifier that a PFFile has is a url, that is generated only after the file is saved.
  • Tracking object references to PFFiles in Local Datastore is tricky and gets even more tricky when the files should be deleted on object removal from LDS.

The rough ideas:

  • Move PFFile staging outside of Caches directory (so we have a guarantee on persistence)
  • When PFFile is staged - add a custom field to the file that would store a generated UUID
  • This UUID would also be used for file name, so we can reconstruct a path for reading/saving
  • Track PFFile references in Local Datastore, and at the moment where there are no more files - delete the actual contents of the staged files.

cc @grantland @hallucinogen @stanleyw

@nlutsenko nlutsenko added the type:feature New feature or improvement of existing feature label Nov 14, 2015
@nlutsenko nlutsenko self-assigned this Nov 14, 2015
@FreudGit
Copy link

+1, sounds great. :)

@FreudGit
Copy link

@nlutsenko Any news on this?

@stale
Copy link

stale bot commented Sep 19, 2018

This issue has been automatically marked as stale because it has not had recent activity. If you believe it should stay open, please let us know! As always, we encourage contributions, check out the Contributing Guide

@stale stale bot added the wontfix label Sep 19, 2018
@stale stale bot closed this as completed Sep 29, 2018
@mtrezza mtrezza added type:improvement type:feature New feature or improvement of existing feature and removed Discussion type:feature New feature or improvement of existing feature labels Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants