You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I set s3-accelerate.
When I use s3-accelerate endpoint to upload a file, an error always happens.
How can I upload a file via s3-accelerate endpoint?
const target = {
Bucket: 'temp-apsoutheast1.s3-accelerate.amazonaws.com', <- UPLOAD ERROR
Bucket: 'temp-apsoutheast1', <- UPLOAD SUCCESS
Key: 'test.mp4',
Body: uploadFile
};
try {
const parallelUploads3 = new Upload({
client: new S3({
useAccelerateEndpoint: true,
region: REGION,
credentials: fromCognitoIdentityPool({
client: new CognitoIdentityClient({ region: REGION }),
identityPoolId: REGION+':'+commonConfig.cognitoPoolId,
}),
}) || new S3Client({
useAccelerateEndpoint: true,
region: REGION,
credentials: fromCognitoIdentityPool({
client: new CognitoIdentityClient({ region: REGION }),
identityPoolId: REGION+':'+commonConfig.cognitoPoolId,
}),
}),
partSize: 200000000, // optional size of each part
leavePartsOnError: false, // optional manually handle dropped parts
params: target,
});
parallelUploads3.on("httpUploadProgress", (progress: any) => {
console.log('progress : ', progress);
});
await parallelUploads3.done();
} catch (e) {
console.log(e);
}
Beta Was this translation helpful? Give feedback.
All reactions