Hi,
I ran React example, it works well, but where is RemoveFile and RenameFile?
it says in assumption 'You have Meteor methods for RemoveFile and RemoveFile' in wiki
(BTW, there is typo, latter RemoveFile should be RenameFile)
Hello @RonenHong ,
Thank you for reporting about this. React docs and examples supported by community members.
Hope @vtocco and @mikkelking will help us here.
If you wish to update/correct current example, feel free to send a PR, here is original article.
@RonenHong I have made a PR for this, #639
The assumption is that you will provide Meteor methods for RemoveFile and RenameFile They are not provided as such, because it is up to you to decide on collection names, and any permissions related to these operations.
@mikkelking thank you for quick response
@RonenHong is this issue solved?
@dr-dimitru @mikkelking I already implemented 'RemoveFile' using remove() function, but how can I change the name, just update file name to Collection?
@RonenHong simply $set new value to name and versions.$.name properties.
I tried to simply use .remove(fileId) in my RemoveFile function but I am now getting this error:
(STDERR) (node:11894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any tip / idea would be kindly appreciated.
Solved, I was returning the cursor back to the caller. Returning null solves it.
We should close this ticket now
Feel free to reopen it in case if the issue is still persists on your end.
Most helpful comment
I tried to simply use .remove(fileId) in my RemoveFile function but I am now getting this error:
(STDERR) (node:11894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any tip / idea would be kindly appreciated.
Solved, I was returning the cursor back to the caller. Returning null solves it.