1
0
Fork 0

Fix upload mechanics

Link-/blobcache-spike
Bassem Dghaidi 2024-06-10 11:01:01 -07:00 committed by GitHub
parent 66d5434f23
commit dccc3f7f1c
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import * as core from '@actions/core'
import {GetCacheBlobUploadURLResponse} from '../../../generated/results/api/v1/blobcache'
import {BlobClient, BlockBlobParallelUploadOptions} from '@azure/storage-blob'
import {BlobClient, BlockBlobClient, BlockBlobParallelUploadOptions} from '@azure/storage-blob'
export async function UploadCache(
uploadURL: GetCacheBlobUploadURLResponse,
@ -16,7 +16,9 @@ export async function UploadCache(
};
// Create blob client from container client
const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
const blobClient: BlobClient = new BlobClient(uploadURL.urls[0].url)
const blockBlobClient: BlockBlobClient = blobClient.getBlockBlobClient()
return blobClient.uploadFile(archivePath, uploadOptions);
return blockBlobClient.uploadFile(archivePath, uploadOptions);
}