UNPKG

@itwin/object-storage-azure

Version:

Object storage implementation using Azure Blob Storage

19 lines 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FrontendBlockBlobClientWrapperFactory = void 0; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ const storage_blob_1 = require("@azure/storage-blob"); const internal_1 = require("@itwin/object-storage-core/lib/common/internal"); const internal_2 = require("../../common/internal"); const FrontendBlockBlobClientWrapper_1 = require("./FrontendBlockBlobClientWrapper"); class FrontendBlockBlobClientWrapperFactory { create(input) { const blobClient = new storage_blob_1.BlockBlobClient((0, internal_1.instanceOfUrlTransferInput)(input) ? input.url : (0, internal_2.buildBlobUrl)(input)); return new FrontendBlockBlobClientWrapper_1.FrontendBlockBlobClientWrapper(blobClient); } } exports.FrontendBlockBlobClientWrapperFactory = FrontendBlockBlobClientWrapperFactory; //# sourceMappingURL=FrontendBlockBlobClientWrapperFactory.js.map