Hi @Terry_Wray
I can’t seem to reproduce what you’re seeing:
❯ ~/bin/mongofiles put image.jpg
2020-08-25T13:46:43.480+1000 connected to: mongodb://localhost/
2020-08-25T13:46:43.692+1000 added gridFile: image.jpg
❯ ~/bin/mongofiles put_id image.jpg '{"$oid":"ffffffffffffffffffffffff"}'
2020-08-25T13:47:52.378+1000 connected to: mongodb://localhost/
2020-08-25T13:47:52.404+1000 added gridFile: image.jpg
Inside the fs.files
collection, the ids seem to be as expected:
> db.fs.files.find()
{ "_id" : ObjectId("5f4489a3c4819a2eaf45d7f5"), "length" : NumberLong(6781), "chunkSize" : 261120, "uploadDate" : ISODate("2020-08-25T03:46:43.681Z"), "filename" : "image.jpg", "metadata" : { } }
{ "_id" : ObjectId("ffffffffffffffffffffffff"), "length" : NumberLong(6781), "chunkSize" : 261120, "uploadDate" : ISODate("2020-08-25T03:47:52.392Z"), "filename" : "image.jpg", "metadata" : { } }
I’m using mongofiles version 100.1.1, in OSX.
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....^"}"
Best regards,
Kevin