mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-06 19:43:23 +08:00
Refactor cache upload functionality and improve test cases
This commit is contained in:
@@ -5,12 +5,13 @@ import {
|
||||
BlockBlobClient,
|
||||
BlockBlobParallelUploadOptions
|
||||
} from '@azure/storage-blob'
|
||||
import {InvalidResponseError} from '../shared/errors'
|
||||
import { InvalidResponseError } from './shared/errors'
|
||||
|
||||
export async function uploadCacheFile(
|
||||
signedUploadURL: string,
|
||||
archivePath: string
|
||||
): Promise<BlobUploadCommonResponse> {
|
||||
export async function uploadCacheArchiveSDK
|
||||
(
|
||||
signedUploadURL: string,
|
||||
archivePath: string
|
||||
): Promise<BlobUploadCommonResponse> {
|
||||
// Specify data transfer options
|
||||
const uploadOptions: BlockBlobParallelUploadOptions = {
|
||||
blockSize: 4 * 1024 * 1024, // 4 MiB max block size
|
||||
Reference in New Issue
Block a user