UNPKG

@itwin/object-storage-azure

Version:

Object storage implementation using Azure Blob Storage

19 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlockBlobClientWrapperFactory = 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 BlockBlobClientWrapper_1 = require("./BlockBlobClientWrapper"); class BlockBlobClientWrapperFactory { create(input) { const blobClient = new storage_blob_1.BlockBlobClient((0, internal_1.instanceOfUrlTransferInput)(input) ? input.url : (0, internal_2.buildBlobUrl)(input)); return new BlockBlobClientWrapper_1.BlockBlobClientWrapper(blobClient); } } exports.BlockBlobClientWrapperFactory = BlockBlobClientWrapperFactory; //# sourceMappingURL=BlockBlobClientWrapperFactory.js.map