Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default (upload function)
✓ const azure = require('gulp-azure-storage');
gulp.src('*').pipe(azure.upload({...}))
✗ import azure from 'gulp-azure-storage'
CommonJS module; default export is an object with upload and download methods. No ESM support.
download function
✓ const azure = require('gulp-azure-storage');
azure.download({...}).pipe(gulp.dest('out'))
✗ const { download } = require('gulp-azure-storage');
download({...})
download is a direct method on the default export. Named destructuring may work but is not documented.
CLI command
✓ upload-to-azure --account YOUR_ACCOUNT --key YOUR_KEY --container YOUR_CONTAINER file.txt
✗ npx gulp-azure-storage upload ...
CLI is a separate binary, not a gulp task. Not exported as a library symbol.
Shows upload and download tasks using gulp-azure-storage with environment variables for credentials.
const gulp = require('gulp');
const azure = require('gulp-azure-storage');
const ACCOUNT = process.env.AZURE_STORAGE_ACCOUNT ?? '';
const KEY = process.env.AZURE_STORAGE_KEY ?? '';
const CONTAINER = 'mycontainer';
gulp.task('upload', function() {
return gulp.src('dist/**/*')
.pipe(azure.upload({
account: ACCOUNT,
key: KEY,
container: CONTAINER,
quiet: true
}));
});
gulp.task('download', function() {
return azure.download({
account: ACCOUNT,
key: KEY,
container: CONTAINER,
prefix: 'images/',
buffer: false
}).pipe(gulp.dest('./downloads'));
});
Errors
Common errors & fixes
Cannot find module 'azure-storage-legacy'
Package depends on 'azure-storage-legacy' which might not be installed or is deprecated/removed from npm.
fixEnsure 'azure-storage-legacy' is in your node_modules (often installed as a dependency, but may be missing if using npm dedupe). Alternatively, switch to a more modern package.
TypeError: azure.upload is not a function
Using ES6 import syntax impropery; the module exports an object with upload and download.
fixUse CommonJS require: const azure = require('gulp-azure-storage'); then azure.upload({...}). Audit
Dependencies
azure-storage-legacyrequiredMicrosoft Azure Storage SDK for Node.js (legacy); deprecated in favor of @azure/storage-blob