Skip to content

Instantly share code, notes, and snippets.

@domharrington
Forked from bengourley/gist:2948429
Created June 18, 2012 14:09
Show Gist options
  • Save domharrington/2948559 to your computer and use it in GitHub Desktop.
Save domharrington/2948559 to your computer and use it in GitHub Desktop.
Fileupload API
var fileUpload = require('file-upload')
, gridfsAdapter = require('fileupload-gridfs')
var middleware = fileUpload.createFileUpload({
adapter: gridfsAdapter({ dbName: 'mydb' })
}).middleware
Exactly the same as this, just a bit nicer for the examples:
var middleware = fileUpload.createFileUpload({
adapter: require('fileupload-gridfs')({ dbName: 'mydb' })
}).middleware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment