highoutput-cloud-storage
0.0.8 • Public • Published Cloud Storage
Class: CloudStorage
new CloudStorage(options)
- options.scope
string
Scope in the single bucket where the file is going to be stored. This should be equivalent to your app name.
- options.region?
string
Specified region. Default value is 'ap-southeast-1'
.
- options.accessKey
string
AWS Access Key ID.
- options.secretKey
string
AWS Secret Access Key.
new CloudStorage(options) example
import CloudStorage from 'highoutput-cloud-storage';
const storage = new CloudStorage({
scope: 'my-app-name',
accessKey: 'AKIAIOSFODNN7EXAMPLE',
secretKey: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
});
storage.getUploadCredentials(params)
- params.filename
string
Filename (with path). Value will be normalized and leading '/'
will be removed.
- params.validity?
string|number
Time validity of credential. Input should be following ms
module format.
- params.upperSizeLimit?
number
Upper file size limit to be uploaded in MB. Deafult value is 10
.
getUploadCredentials(params) example
const info = storage.getUploadCredentials({
filename: 'some/filename.js',
});
console.log(info);
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.8
1
Version History
Package Sidebar
Install
npm i highoutput-cloud-storage
Weekly Downloads