You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.
We have been using your package to store rendered PDF's on the server. Currently we're implementing an extremely basic function to remove those PDF's. The code is as simple as this: (it is an automated test).
letexistDoc=FileCollection.findOne(fileID);if(!existDoc)throwError("File did not exist");FileCollection.remove(fileID);letgoneDoc=FileCollection.findOne(fileID);if(goneDoc)throwError("Failed to remove file with ID: "+fileID);
This keeps on throwing Failed to remove file.... Remember: the findOne call is successful. We have tried:
Printing the result of remove (should be the amount of docs removed): undefined
Giving a fake ID: no errors, also returns undefined
Passing {_id: fileID} as selector.
Passing existDoc as selector: throws cannot remove file belongs to: "docs" not: "cfs.docs.filerecord"
Setting both allow and deny props, or just one of them. Nothing changes (but the allow and deny do get set, download stops working if we remove allow).
Tried setting a callback. Callback is never called, either with success or fail.
Used both GridFS and Filesystem
I even tried calling FileCollection.remove({}) and got Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
This code is server-side and the collection is not available client side, purely on the server.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Dear CollectionFS team.
We have been using your package to store rendered PDF's on the server. Currently we're implementing an extremely basic function to remove those PDF's. The code is as simple as this: (it is an automated test).
This keeps on throwing
Failed to remove file...
. Remember: thefindOne
call is successful. We have tried:remove
(should be the amount of docs removed):undefined
undefined
{_id: fileID}
as selector.existDoc
as selector: throwscannot remove file belongs to: "docs" not: "cfs.docs.filerecord"
allow
anddeny
props, or just one of them. Nothing changes (but theallow
anddeny
do get set, download stops working if we removeallow
).GridFS
andFilesystem
FileCollection.remove({})
and gotError: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
This code is server-side and the collection is not available client side, purely on the server.
The text was updated successfully, but these errors were encountered: