Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
AJ ONeal
c95f188d61
|
před 4 roky | |
---|---|---|
bin | před 4 roky | |
.gitignore | před 4 roky | |
.jshintrc | před 4 roky | |
.prettierrc | před 4 roky | |
LICENSE | před 4 roky | |
README.md | před 4 roky | |
index.js | před 4 roky | |
package-lock.json | před 4 roky | |
package.json | před 4 roky | |
test.bin | před 4 roky | |
test.js | před 4 roky |
README.md
s3.js | a Root project
Minimalist S3 client
A lightweight alternative to the s3 SDK that uses only @root/request and aws4.
- set()
- get()
- head()
- delete()
- sign()
Download a file from S3
s3.get({
accessKeyId,
secretAccessKey,
region,
bucket,
prefix,
key
});
Upload a new file to S3
s3.set({
accessKeyId,
secretAccessKey,
region,
bucket,
prefix,
key,
body,
size
});
Return signed URL without fetching.
s3.sign({
method: 'get',
accessKeyId,
secretAccessKey,
region,
bucket,
prefix,
key
});
If the body is a stream then size
must be set to fs.statSync(filePath).size
, or the request will fail:
501
<Code>NotImplemented</Code><Message>A header you provided implies functionality that is not implemented</Message>