Skip to content

Instantly share code, notes, and snippets.

@hylom
Created April 14, 2013 18:42
Show Gist options
  • Save hylom/5383743 to your computer and use it in GitHub Desktop.
Save hylom/5383743 to your computer and use it in GitHub Desktop.
load-from-mongodb.jsとstore-to-mongodb.jsの実行例
$ node store-to-mongodb.js ./test/sample.JPG
insert succeeded.
$ mongo test01
> db.images.find()
{ "filename" : "sample.JPG", "data" : BinData(0,"/9j/4AAQSkZJRgABAQEAtAC0AAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
$ node load-from-mongodb.js sample.JPG
load succeeded.
$ ls
load-from-mongodb.js sample.JPG test
node_modules store-to-mongodb.js testdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment