An open API service indexing awesome lists of open source software.

https://github.com/projectweekend/express-azure-image-upload

A drop-in route handler that places an image in an Azure Storage Container and returns its blob URL
https://github.com/projectweekend/express-azure-image-upload

Last synced: 9 months ago
JSON representation

A drop-in route handler that places an image in an Azure Storage Container and returns its blob URL

Awesome Lists containing this project

README

          

# 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:**

```javascript
var express = require( "express" );
var ImageUpload = require( "express-azure-image-upload" );

var router = express.Router();

var storageAcct = "yourStorageAcct";
var storageKey = "yourStorageKey";
var storageContainer = "yourStorageContainer";

var imageUpload = new ImageUpload( storageAcct, storageKey, storageContainer );

router.post( "/whatever", function ( req, res, next ) {

imageUpload.handler( req, res, next );

} );
```

**When making a POST request:**

Include the image in a form data property named `image`.