Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-storage has been deprecated #186

Open
matteovivona opened this issue Aug 3, 2023 · 1 comment
Open

azure-storage has been deprecated #186

matteovivona opened this issue Aug 3, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@matteovivona
Copy link
Collaborator

npm WARN deprecated azure-storage@2.10.7: Please note: newer packages @azure/storage-blob, @azure/storage-queue and @azure/storage-file are available as of November 2019 and @azure/data-tables is available as of June 2021. While the legacy azure-storage package will continue to receive critical bug fixes, we strongly encourage you to upgrade. Migration guide can be found: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/MigrationGuide.md

@Talent30
Copy link

Talent30 commented Dec 10, 2023

async createReadStream(artifactPath) {
      const read = await blobService
        .getContainerClient(containerName)
        .getBlobClient(artifactPath)
        .download();

      const stream = new Readable().wrap(read!.readableStreamBody!);

      return stream as NodeJS.ReadStream;
    },
createWriteStream(artifactPath) {
      return blobService
        .getContainerClient(containerName)
        .getBlobClient(artifactPath).getBlockBlobClient().uploadStream();
    },

I gave a go, the new sdk design is awful IMO...you have to pass a Readable to uploadStream(readable) Any suggestion to make it work without change too much code? @fox1t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants