Skip to content

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

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
ishaan1995 opened this issue Feb 19, 2016 · 2 comments
Closed

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

ishaan1995 opened this issue Feb 19, 2016 · 2 comments

Comments

@ishaan1995
Copy link

I exectuted the cURL command to delete a file,
the file got deleted,fs.chunks holds nothing now but fs.files still contains it details with length parameter now 0 but still holds some space and objectId that holds nothing.

1)The cURL command--->

curl -X DELETE
-H "X-Parse-Application-Id: myAppId"
-H "X-Parse-Master-Key: qwerty"
http://localhost:1337/parse/files/c6706c53593d442d482b780713858026_hello2.txt

2)The mongo shell output--->

db.fs.files.find()
{ "_id" : ObjectId("56c717b40acd97bd096bd832"), "filename" : "c6706c53593d442d482b780713858026_hello2.txt", "contentType" : "binary/octet-stream", "length" : 0, "chunkSize" : 261120, "uploadDate" : ISODate("2016-02-19T13:27:54.045Z"), "aliases" : null, "metadata" : null, "md5" : "d41d8cd98f00b204e9800998ecf8427e" }
{ "_id" : ObjectId("56c7177e0acd97bd096bd830"), "filename" : "a3a99e03d3bc411fb9925c1d81e96c60_hello.txt", "contentType" : "binary/octet-stream", "length" : 0, "chunkSize" : 261120, "uploadDate" : ISODate("2016-02-19T13:29:44.287Z"), "aliases" : null, "metadata" : null, "md5" : "d41d8cd98f00b204e9800998ecf8427e" }

even tough db.fs.chunks.find() returns nothing

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

Seems to be unrelated to Parse Server. We use the proper GridStore method for removing a file from what I can see... There's no option for us to remove just the chunks or leave the reference in fs.files.

@gfosco gfosco closed this as completed Feb 26, 2016
@ishaan1995
Copy link
Author

Then how can i remove those references?
By directly using Mongodb api? @gfosco

maninga added a commit to maninga/parse-server that referenced this issue May 11, 2016
flovilmart pushed a commit that referenced this issue Jun 27, 2016
* #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 issue 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 issue 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

No branches or pull requests

2 participants