1.0.6 • Published 11 years ago
express-azure-image-upload v1.0.6
Usage
When creating an instance of ImageUpload you will need to provide three parameters:
storageAcct- The name of the Azure storage account being used for images.storageKey- The access key associated withstorageAcct.storageContainer- The name of a storage container that exists understorageAcct.
In your Express router:
var express = require( "express" );
var ImageUpload = require( "express-azure-image-upload" );
var router = express.Router();
function imageHandler () {
var storageAcct = "yourStorageAcct";
var storageKey = "yourStorageKey";
var storageContainer = "yourStorageContainer";
var imageUpload = new ImageUpload( storageAcct, storageKey, storageContainer );
return imageUpload.handler;
}
router.post( "/whatever", imageHandler() );When making a POST request:
Include the image in a form data property named image.