Коммит
546d91e942
|
@ -921,7 +921,7 @@ BlobService.prototype.putBlockBlobFromFile = function (container, blob, localFil
|
|||
* @example
|
||||
* var azure = require('azure');
|
||||
* var blobService = azure.createBlobService();
|
||||
* blobService.createBlockBlobFromStream('taskcontainer', 'task1', fs.createReadStream('task1-upload.txt'), 11, function(error) {
|
||||
* blobService.putBlockBlobFromStream('taskcontainer', 'task1', fs.createReadStream('task1-upload.txt'), 11, function(error) {
|
||||
* if(!error) {
|
||||
* // Blob uploaded
|
||||
* }
|
||||
|
@ -1636,8 +1636,7 @@ BlobService.prototype.createBlobSnapshot = function (container, blob, optionsOrC
|
|||
* Copies a blob to a destination within the storage account. The Copy Blob operation copies the entire committed blob.
|
||||
*
|
||||
* @this {BlobService}
|
||||
* @param {string} sourceContainer The source container name.
|
||||
* @param {string} sourceBlob The source blob name.
|
||||
* @param {string} sourceUri The source blob URI.
|
||||
* @param {string} targetContainer The target container name.
|
||||
* @param {string} targetBlob The target blob name.
|
||||
* @param {object} [options] The blobs and request options.
|
||||
|
@ -1760,7 +1759,6 @@ BlobService.prototype.abortCopyBlob = function (container, blob, copyId, options
|
|||
* @this {BlobService}
|
||||
* @param {string} container The container name.
|
||||
* @param {string} blob The blob name.
|
||||
* @param {int} leaseDuration The lease duration.
|
||||
* @param {object} [options] The blob and request options.
|
||||
* @param {string} [options.leaseDuration] The lease duration. Default is never to expire.
|
||||
* @param {string} [options.proposedLeaseId] The proposed lease identifier.
|
||||
|
@ -1856,7 +1854,6 @@ BlobService.prototype.breakLease = function (container, blob, leaseId, optionsOr
|
|||
* @this {BlobService}
|
||||
* @param {string} container The container name.
|
||||
* @param {string} blob The blob name.
|
||||
* @param {string} text The text string.
|
||||
* @param {int} rangeStart The range start.
|
||||
* @param {int} rangeEnd The range end.
|
||||
* @param {object} [options] The page blob and request options.
|
||||
|
@ -2627,6 +2624,14 @@ BlobService.prototype.createBlockBlobFromFile = function (container, blob, local
|
|||
* @return {SpeedSummary}
|
||||
*/
|
||||
BlobService.prototype.createBlockBlobFromStream = function (container, blob, stream, streamLength, optionsOrCallback, callback) {
|
||||
validate.validateArgs('createBlockBlobFromStream', function (v) {
|
||||
v.string(container, 'container');
|
||||
v.string(blob, 'blob');
|
||||
v.containerNameIsValid(container);
|
||||
v.blobNameIsValid(container, blob);
|
||||
v.callback(callback);
|
||||
});
|
||||
|
||||
if (streamLength >= this.singleBlobPutThresholdInBytes) {
|
||||
return this._createBlobFromStream(container, blob, BlobConstants.BlobTypes.BLOCK, stream, streamLength, optionsOrCallback, callback);
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче