Skip to content

Commit

Permalink
feat(react-storage): enable upload crc32 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Nov 7, 2024
1 parent 9f78d59 commit ebb38f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe('uploadHandler', () => {
locationCredentialsProvider: credentials,
onProgress: expect.any(Function),
preventOverwrite: true,
checksumAlgorithm: 'crc-32',
},
path: `${baseInput.destinationPrefix}${baseInput.data.key}`,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {

import { constructBucket } from './utils';

const CHECKSUM_ALGORITHM_CRC32 = 'crc-32' as const;

export interface UploadHandlerOptions extends TaskHandlerOptions {
preventOverwrite?: boolean;
}
Expand Down Expand Up @@ -67,6 +69,7 @@ export const uploadHandler: UploadHandler = ({
},
preventOverwrite,
customEndpoint,
checksumAlgorithm: CHECKSUM_ALGORITHM_CRC32,
},
};

Expand Down

0 comments on commit ebb38f9

Please sign in to comment.