Skip to content

Commit b7dffb3

Browse files
authored
CI-739 - Use Full Object checksum when uploading via S3 (#41)
* specify full object checksum when uploading * bump version * update versions
1 parent 7377c18 commit b7dffb3

File tree

8 files changed

+800
-719
lines changed

8 files changed

+800
-719
lines changed

packages/api-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cirrobio/api-client",
3-
"version": "0.10.5",
3+
"version": "0.10.6",
44
"description": "API client for Cirro",
55
"author": "CirroBio",
66
"repository": {

packages/react-auth/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"test": "jest --coverage --silent --passWithNoTests"
2525
},
2626
"dependencies": {
27-
"@cirrobio/api-client": "^0.9.0",
27+
"@cirrobio/api-client": "^0.10.0",
2828
"@cirrobio/react-core": "^0.0.1",
29-
"@cirrobio/sdk": "^0.9.0",
29+
"@cirrobio/sdk": "^0.10.0",
3030
"@mui/icons-material": "^5.17.1",
3131
"@mui/lab": "^5.0.0-alpha.176",
3232
"@mui/material": "^5.15.10",

packages/react-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test": "jest --coverage --silent --passWithNoTests"
2525
},
2626
"dependencies": {
27-
"@cirrobio/sdk": "^0.9.0"
27+
"@cirrobio/sdk": "^0.10.0"
2828
},
2929
"peerDependencies": {
3030
"react": "^16.14 || ^17 || ^18 || ^19"

packages/react-tool/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"test": "jest --coverage --silent --passWithNoTests"
2323
},
2424
"dependencies": {
25-
"@cirrobio/api-client": "^0.9.0",
25+
"@cirrobio/api-client": "^0.10.0",
2626
"@cirrobio/react-auth": "^0.0.1",
2727
"@cirrobio/react-core": "^0.0.1",
28-
"@cirrobio/sdk": "^0.9.0"
28+
"@cirrobio/sdk": "^0.10.0"
2929
},
3030
"peerDependencies": {
3131
"@emotion/react": "^11.11.3",

packages/react-ui-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test": "jest --coverage --silent --passWithNoTests"
2525
},
2626
"dependencies": {
27-
"@cirrobio/sdk": "^0.9.0"
27+
"@cirrobio/sdk": "^0.10.0"
2828
},
2929
"peerDependencies": {
3030
"@emotion/react": "^11.11.3",

packages/sdk/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cirrobio/sdk",
3-
"version": "0.10.5",
3+
"version": "0.10.6",
44
"description": "SDK for Cirro",
55
"author": "CirroBio",
66
"repository": {
@@ -30,10 +30,10 @@
3030
"preset": "ts-jest"
3131
},
3232
"dependencies": {
33-
"@aws-sdk/client-s3": "^3.34.0",
34-
"@aws-sdk/lib-storage": "^3.34.0",
35-
"@aws-sdk/s3-request-presigner": "^3.34.0",
36-
"@cirrobio/api-client": "^0.10.1",
33+
"@aws-sdk/client-s3": "^3.886.0",
34+
"@aws-sdk/lib-storage": "^3.886.0",
35+
"@aws-sdk/s3-request-presigner": "^3.886.0",
36+
"@cirrobio/api-client": "^0.10.2",
3737
"uuid": "^11.1.0"
3838
},
3939
"devDependencies": {

packages/sdk/src/file/actions/upload.fn.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Upload } from "@aws-sdk/lib-storage";
22
import { AWSCredentials } from '@cirrobio/api-client';
33
import { createS3Client } from "../util/s3-client";
44
import { PutObjectCommandInput } from "@aws-sdk/client-s3";
5+
import { CreateMultipartUploadRequest } from "@aws-sdk/client-s3/dist-types/models/models_0";
56

67
export interface UploadFileParams {
78
bucket: string;
@@ -15,12 +16,13 @@ export interface UploadFileParams {
1516
* Upload a file to S3
1617
*/
1718
export function uploadFile({ bucket, path, file, credentials, metadata }: UploadFileParams): Upload {
18-
const params: PutObjectCommandInput = {
19+
const params: PutObjectCommandInput & CreateMultipartUploadRequest = {
1920
Bucket: bucket,
2021
Key: path,
2122
Body: file,
2223
ContentType: file.type,
23-
Metadata: metadata
24+
Metadata: metadata,
25+
ChecksumType: "FULL_OBJECT"
2426
};
2527
return new Upload({
2628
client: createS3Client(credentials),

0 commit comments

Comments
 (0)