Tag: s3 npm

Amazon S3中的节点file upload错误

在亚马逊S3上传文件时出现错误。 代码如下: const s3 = require('s3'); const client = s3.createClient({ maxAsyncS3: 100, s3RetryCount: 3, s3RetryDelay: 30000, multipartUploadThreshold: 20971520, multipartUploadSize: 15728640, s3Options: { accessKeyId: "xxxx", secretAccessKey: "yyyy", region: "us-east-2", }, }); const params = { localDir: "file-path", s3Params: { Bucket: "bucket-name", Prefix: "images/image.jpg" }, }; const uploader = client.uploadDir(params); uploader.on('error', (err) => { console.error("unable to upload:", […]