How to use the @azure/storage-blob.BlockBlobURL.fromContainerURL function in @azure/storage-blob

To help you get started, we’ve selected a few @azure/storage-blob examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure-Samples / azure-storage-js-v10-quickstart / v10 / index.js View on Github external
async function uploadLocalFile(aborter, containerURL, filePath) {
    filePath = path.resolve(filePath);

    const fileName = path.basename(filePath);
    const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, fileName);

    return await uploadFileToBlockBlob(aborter, filePath, blockBlobURL);
}
github serverless / serverless-azure-functions / src / services / azureBlobStorageService.ts View on Github external
private getBlockBlobURL(containerName: string, blobName: string): BlockBlobURL {
    Guard.empty(containerName, "containerName");
    Guard.empty(blobName, "blobName");
    this.checkInitialization();

    return BlockBlobURL.fromContainerURL(
      this.getContainerURL(containerName),
      blobName,
    );
  }
github microsoft / VoTT / src / providers / storage / azureBlobStorage.ts View on Github external
private getBlockBlobURL(blobName: string): BlockBlobURL {
        const containerURL = this.getContainerURL();
        return BlockBlobURL.fromContainerURL(
            containerURL,
            blobName,
        );
    }
github Soluto / dynamico / server / azure-blob-storage / lib / index.ts View on Github external
[componentVersion]: async () => {
              const blobUrl = BlockBlobURL.fromContainerURL(this.container, current);

              return JSON.parse(await this.downloadBlobAsString(blobUrl)).peerDependencies;
            }
          }
github Soluto / dynamico / server / azure-blob-storage / lib / index.ts View on Github external
getCode: async () => {
        const codeUrl = BlockBlobURL.fromContainerURL(this.container, `${basePath}/${main}`);

        return await this.downloadBlobAsString(codeUrl);
      }
    };
github Azure-Samples / azure-storage-js-v10-quickstart / v10 / index.js View on Github external
async function uploadStream(aborter, containerURL, filePath) {
    filePath = path.resolve(filePath);

    const fileName = path.basename(filePath).replace('.md', '-stream.md');
    const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, fileName);

    const stream = fs.createReadStream(filePath, {
      highWaterMark: FOUR_MEGABYTES,
    });

    const uploadOptions = {
        bufferSize: FOUR_MEGABYTES,
        maxBuffers: 5,
    };

    return await uploadStreamToBlockBlob(
                    aborter, 
                    stream, 
                    blockBlobURL, 
                    uploadOptions.bufferSize, 
                    uploadOptions.maxBuffers);