Since get_id requires the parameter to be a well-formed extended JSON, please ensure that the quote types are correct, i.e. JSON only recognizes double quotes, so "$oid" will work while '$oid' will not.
@kevinadi, thank you so much for your quick and concise answer!
I’ve now used this command in the mongofiles console:
mongofiles /uri:mongodb+srv://cluster01.myhost.com /username:blah /password:blah /db:myDB put_id “Stairwell logo.png” ‘{"$oid":“b78fe9a0cc83da37e410ac2f”}’
The file was successfully uploaded, but I noticed that the ObjectId is different from a file I uploaded using just the “put” command (letting GridFS assign the ObjectId).
Could you double check the version you have? Also, if you’re using Windows, note that the Windows cmd doesn’t recognize single quotes as delimiters. So in Windows the quotes character may need to be escaped like "{^"oid^":^"ffff....^"}"