ali-oss-sdk
TypeScript icon, indicating that this package has built-in type declarations

7.0.0-beta.3 • Public • Published

ts release version of ali-oss supoort tree shaking

ali-oss

Installation

pnpm add ali-oss-sdk
# or
yarn add ali-oss-sdk
# or
npm install ali-oss-sdk

Quick start

import { Client, put, get } from 'ali-oss-sdk
es'

const config = {
  accessKeyId: 'your access key id',
  accessKeySecret: 'your access key secret',
  bucket: 'your bucket',
  region: 'oss-cn-hangzhou'
}



 before use
Client.use(put, get);

const client = new Client(config);

const uploadName = 'test.txt'
const file =  new File(["foo"], "foo.txt", {
	type: "text
plain",
})

client.put(uploadName, file).then(
  client.get(uploadName).then(res => {
    console.log(res.content.toString) 

 foo
  })
)

Support

multipartUpload
putStream
put
abortBucketWorm
completeBucketWorm
deleteBucketLifecycle
deleteBucketCORS
deleteBucket
deleteBucketPolicy
deleteBucketEncryption
deleteBucketLogging
deleteBucketReferer
deleteBucketTags
extendBucketWorm
deleteBucketWebsite
getBucketACL
getBucketCORS
getBucketEncryption
getBucketInfo
getBucketLifecycle
getBucketPolicy
getBucketLogging
getBucketLocation
getBucketReferer
getBucketTags
getBucketRequestPayment
getBucketVersioning
getBucketWebsite
getBucketWorm
initiateBucketWorm
putBucketACL
listBuckets
putBucket
putBucketCORS
putBucketEncryption
putBucketPolicy
putBucketLifecycle
putBucketReferer
putBucketLogging
putBucketRequestPayment
putBucketVersioning
putBucketTags
putBucketWebsite
processObjectSave
abortMultipartUpload
handleUploadPart
listParts
completeMultipartUpload
listUploads
initMultipartUpload
multipartUploadCopy
resumeMultipart
uploadPart
uploadPartCopy
append
calculatePostSignature
copy
deleteMulti
deleteObject
deleteObjectTagging
generateObjectUrl
getACL
get
getAsyncFetch
getBucketVersions
getObjectMeta
getObjectTagging
getObjectUrl
getSymlink
head
list
postAsyncFetch
putACL
putMeta
putObjectTagging
restore
putSymlink
signatureUrl

Readme

Keywords

Package Sidebar

Install

npm i ali-oss-sdk

Weekly Downloads

3

Version

7.0.0-beta.3

License

MIT

Unpacked Size

2.3 MB

Total Files

699

Last publish

Collaborators

  • fyeeme