We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.8
Linux 6.5.0-28-generic x86_64 x86_64
Run the following script:
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3"; import * as fs from 'fs'; import * as path from 'path'; const config = { key: "", secret: '', bucket: "", endpoint: "", } const s3Client = new S3Client({ endpoint: config.endpoint, region: "auto", credentials: { accessKeyId: config.key, secretAccessKey: config.secret, } }); let bucketName = config.bucket async function uploadFile(filePath) { const fileName = path.basename(filePath); const startTime = new Date().getTime(); const fileContent = fs.readFileSync(filePath); const params = { Bucket: bucketName, Key: fileName, Body: fileContent }; try { await s3Client.send(new PutObjectCommand(params)); const elapsedTime = new Date().getTime() - startTime; console.log(`Successfully uploaded ${fileName} to ${bucketName} in ${elapsedTime} ms`); } catch (err) { console.error(`Failed to upload file: ${err}`); } } uploadFile('./test.jpg');
Uploading speed should be same with Node.
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #7428
Sorry, something went wrong.
No branches or pull requests
What version of Bun is running?
1.1.8
What platform is your computer?
Linux 6.5.0-28-generic x86_64 x86_64
What steps can reproduce the bug?
Run the following script:
What is the expected behavior?
Uploading speed should be same with Node.
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: