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
- Host: GitHub
- URL: https://github.com/projectweekend/express-azure-image-upload
- Owner: projectweekend
- License: mit
- Created: 2015-03-27T22:22:43.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-30T21:55:12.000Z (over 11 years ago)
- Last Synced: 2025-03-03T23:07:04.385Z (over 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`.