lib/storage/azure.js
function createContainerBlob(blob, path, localPath, _gzip, callback) {
  // Draw the extension from uploadfs, where we know they will be using
  // reasonable extensions, not from what could be a temporary file
  // that came from the gzip code. -Tom
  var extension = extname(path).substring(1);
  var contentSettings = {
    cacheControl: `max-age=${DEFAULT_MAX_CACHE}, public`,
    // contentEncoding: _gzip ? 'gzip' : 'deflate',
    contentType: contentTypes[extension] || 'application/octet-stream'
  };
  if (_gzip) {
    contentSettings.contentEncoding = 'gzip';
  }
  blob.svc.createBlockBlobFromLocalFile(
    blob.container,
    path,
    localPath,
    {
      contentSettings: contentSettings
    },
    function(error, result, response) {
      return callback(error);
    }
  );
}
function createContainerBlob(blob, path, localPath, _gzip, callback) {
  // Draw the extension from uploadfs, where we know they will be using
  // reasonable extensions, not from what could be a temporary file
  // that came from the gzip code. -Tom
  var extension = extname(path).substring(1);
  var contentSettings = {
    cacheControl: `max-age=${DEFAULT_MAX_CACHE}, public`,
    // contentEncoding: _gzip ? 'gzip' : 'deflate',
    contentType: contentTypes[extension] || 'application/octet-stream'
  };
  if (_gzip) {
    contentSettings.contentEncoding = 'gzip';
  }
  blob.svc.createBlockBlobFromLocalFile(
    blob.container,
    path,
    localPath,
    {
      contentSettings: contentSettings
    },
    function(error, result, response) {
      return callback(error);
    }
  );
}
function createContainerBlob ( blob , path , localPath , _gzip , callback ) { // Draw the extension from uploadfs, where we know they will be using // reasonable extensions, not from what could be a temporary file // that came from the gzip code. -Tom var extension = extname ( path ) . substring ( 1 ) ; var contentSettings = { cacheControl : ` ${ DEFAULT_MAX_CACHE } ` , // contentEncoding: _gzip ? 'gzip' : 'deflate', contentType : contentTypes [ extension ] || 'application/octet-stream' } ; if ( _gzip ) { contentSettings . contentEncoding = 'gzip' ; } blob . svc . createBlockBlobFromLocalFile ( blob . container , path , localPath , { contentSettings : contentSettings } , function ( error , result , response ) { return callback ( error ) ; } ) ; }
Send a binary file to a specified container and a specified service
@param {Object} blob Azure Service info and container
@param {String} path Remote path
@param {String} localPath Local file path
@param {Function} callback Callback to be called when operation is terminated
@return {any} Result of the callback
Send a binary file to a specified container and a specified service