express-azure-image-upload

1.0.6 • Public • Published

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 with storageAcct.
  • storageContainer - The name of a storage container that exists under storageAcct.

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.

Package Sidebar

Install

npm i express-azure-image-upload

Weekly Downloads

1

Version

1.0.6

License

MIT

Last publish

Collaborators

  • projectweekend