Skip to content

#506 fix: Deleting a file does not delete from fs.files #1758

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

Merged
merged 3 commits into from
Jun 27, 2016

Conversation

maninga
Copy link
Contributor

@maninga maninga commented May 11, 2016

As illustrated in https://mongodb.github.io/node-mongodb-native/api-generated/gridstore.html#unlink
the Gridstore should be instanciated on readOnly mode, then unlink removes from fs.chunks and fs.files

@flovilmart
Copy link
Contributor

flovilmart commented May 25, 2016

@maninga can you add a test in order to make sure that it's working correctly?

* upstream/master: (63 commits)
  Fixes parse-community#1649 (parse-community#1650)
  Update issue template (parse-community#1899)
  Break schemaController dependency. (parse-community#1901)
  Remove unnecessary null check
  Update schema mismatch error to include type string (parse-community#1898)
  Move more mongo specific stuff into mongo adapter
  Kill mongoOptions
  Consistent parameter order
  move transformWhere into mongo adapter
  Remove options from count
  Can't sort a count
  Remove limit from count
  Destructure mongo options
  remove adaptive collection call
  create + use adapter count instead of collection count
  transformWhere in MongoAdapter
  remove schemaController paramater
  Remove schemaController parameter
  Remove getRelationFields
  Remove all dependencies on schemaController
  ...
@ghost
Copy link

ghost commented May 26, 2016

@maninga updated the pull request.

@codecov-io
Copy link

codecov-io commented May 26, 2016

Current coverage is 91.84%

Merging #1758 into master will not change coverage

@@             master      #1758   diff @@
==========================================
  Files            91         91          
  Lines          6385       6385          
  Methods        1111       1111          
  Messages          0          0          
  Branches       1337       1337          
==========================================
  Hits           5864       5864          
  Misses          521        521          
  Partials          0          0          

Powered by Codecov. Last updated by 0850c18...331a252

@maninga
Copy link
Contributor Author

maninga commented May 26, 2016

ok, I just push that so the pull request is updated.

@ghost
Copy link

ghost commented May 26, 2016

@maninga updated the pull request.

@flovilmart flovilmart merged commit 19080ed into parse-community:master Jun 27, 2016
rsouzas pushed a commit to back4app/parse-server that referenced this pull request Mar 15, 2017
parse-community#1758)

* parse-community#506 fix: Deleting a file does not delete from fs.files

* test added to check that GridStoreAdapter deleteFile removes from fs.files and fs.chunks
rsouzas pushed a commit to back4app/parse-server that referenced this pull request Mar 16, 2017
parse-community#1758)

* parse-community#506 fix: Deleting a file does not delete from fs.files

* test added to check that GridStoreAdapter deleteFile removes from fs.files and fs.chunks
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

Successfully merging this pull request may close these issues.

4 participants