All Projects → Alex1990 → tiny-oss

Alex1990 / tiny-oss

Licence: MIT license
A tiny aliyun oss sdk for browser which focus on uploading.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Labels

Projects that are alternatives of or similar to tiny-oss

aliyun-oss-deploy
🙈 一个 nodejs 命令行工具,用于部署静态资源到 aliyun oss,支持代码方式和 CLI 方式!
Stars: ✭ 31 (+24%)
Mutual labels:  oss, aliyun
Aliyungo
Go SDK for Aliyun (Alibaba Cloud) - Golang API for ECS, OSS, DNS, SLB, RDS, RAM, MNS, STS, SLS, MQ, Push, OpenSearch, DM, Container Service etc.
Stars: ✭ 756 (+2924%)
Mutual labels:  oss, aliyun
Aliyunoss
阿里云 OSS 官方 SDK 的 Composer 封装,支持任何 PHP 项目,包括 Laravel、Symfony、TinyLara 等等。
Stars: ✭ 481 (+1824%)
Mutual labels:  oss, aliyun
Aliyun Sdk Js
阿里云 SDK for Javascript,支持在浏览器和 Nodejs 环境使用,支持大部分阿里云服务。
Stars: ✭ 727 (+2808%)
Mutual labels:  oss, aliyun
Ali Oss
Aliyun OSS(open storage service) JavaScript SDK for the browser and Node.js
Stars: ✭ 1,579 (+6216%)
Mutual labels:  oss, aliyun
aliyun-oss-wordpress
使用阿里云对象存储 OSS 作为附件存储空间的WordPress插件。QQ交流群:887595381
Stars: ✭ 56 (+124%)
Mutual labels:  oss, aliyun
ali-img
阿里云图像处理工具包
Stars: ✭ 16 (-36%)
Mutual labels:  oss, aliyun
xayah
WEB文件管理器
Stars: ✭ 19 (-24%)
Mutual labels:  oss, aliyun
Xdupdate
Android 自动更新 / 阿里云 OSS 一键上传更新 (Android auto update / upload update by aliyun OSS)
Stars: ✭ 92 (+268%)
Mutual labels:  oss, aliyun
Waliyun
阿里云Node.js Open API SDK(完整版)
Stars: ✭ 40 (+60%)
Mutual labels:  oss, aliyun
Aliyun Oss
Aliyun oss for Laravel5, also support flysystem adapter
Stars: ✭ 31 (+24%)
Mutual labels:  oss, aliyun
aliyun-oss-laravel
Laravel 的 Aliyun OSS 扩展, 支持 Laravel 9. Alibaba Cloud Object Storage Service For Laravel.
Stars: ✭ 91 (+264%)
Mutual labels:  oss, aliyun
laravel-admin
LaravelAdmin是基于PHP开发的基础管理后台系统,做到开箱即用,为新项目开发省去了基础功能开发的步骤;此系统采用前后端分离模式,后端使用Laravel,前端使用vue;主要包含:登录、注销、可视化数据大屏、管理员、角色管理、菜单管理、权限管理、错误日志、登录日志、访问日志、获取服务器CPU使用率、内存使用率等功能。后端主要使用Artisan命令行、Jobs消息队列、 Rules验证规则、Restful API、Composer扩展包、Redis秒杀、Extend自定义扩展类:微信授权、钉钉告警推送、MongoDB、阿里云OSS、七牛云存储、七牛云直播、php-jwt TOKEN、Phpoffice、MySql数据库字典、Elasticsearch等技术。
Stars: ✭ 45 (+80%)
Mutual labels:  oss, aliyun
vue-oss
基于vue2+plupload的阿里云OSS上传组件(支持断点续传,可上传size>100M的文件)
Stars: ✭ 33 (+32%)
Mutual labels:  oss, aliyun
osschat
Apache Open Source Software Chat BOT
Stars: ✭ 115 (+360%)
Mutual labels:  oss
php-aliyun-open-api-live
阿里云直播API,使用guzzleHttp 中间件方式实现,单文件
Stars: ✭ 18 (-28%)
Mutual labels:  aliyun
oge
Page metadata as a service
Stars: ✭ 22 (-12%)
Mutual labels:  oss
aliyunddns
python 实现阿里云DNS动态解析
Stars: ✭ 32 (+28%)
Mutual labels:  aliyun
github-comment
CLI to create and hide GitHub comments
Stars: ✭ 42 (+68%)
Mutual labels:  oss
DynAI
Practical applications of AI / Machine Learning in BIM, implemented as a Dynamo Package
Stars: ✭ 24 (-4%)
Mutual labels:  oss

tiny-oss

A tiny aliyun oss sdk for browser which focus on uploading. Less than 10kb (min+gzipped).

English | 简体中文

Installation

Npm

npm install tiny-oss

Yarn

yarn add tiny-oss

Usage

Basic

const oss = new TinyOSS({
  accessKeyId: 'your accessKeyId',
  accessKeySecret: 'your accessKeySecret',
  // Recommend to use the stsToken option in browser
  stsToken: 'security token',
  region: 'oss-cn-beijing',
  bucket: 'your bucket'
});

const blob = new Blob(['hello world'], { type: 'text/plain' });

// Upload
oss.put('hello-world', blob);

Upload progress

You can specify the third parameter to monitor the upload progress data:

// Upload progress
oss.put('hello-world', blob, {
  onprogress (e) {
    console.log('total: ', e.total, ', uploaded: ', e.loaded);
  }
});

More options or methods see API.

Compatibility

This package depends on some modern Web APIs, such as Blob, Uint8Array, FileReader, Promise.

So, it should work in the below browsers.

  • Chrome >= 20
  • Edge >= 12
  • IE >= 10
  • Firefox >= 4
  • Safari >= 8
  • Opera >= 11
  • Android >= 4.4.4
  • iOS >= 8

For IE and low version FireFox, you should import a promise polyfill, such as es6-promise.

API

new TinyOSS(options)

options

Please check Browser.js offical document.

  • accessKeyId
  • accessKeySecret
  • stsToken
  • bucket
  • endpoint
  • region
  • secure
  • timeout

put(objectName, blob, options)

Upload the blob.

Arguments

  • objectName (String): The object name.
  • blob (Blob|File): The object to be uploaded.
  • [options (Object)]
    • [onprogress (Function)]: The upload progress event listener receiving an progress event object as an parameter.

Return

  • (Promise)

putSymlink(objectName, targetObjectName)

Create a symlink.

Arguments

  • objectName (String): The symlink object name.
  • targetObjectName (String): The target object name.

Return

  • (Promise)

signatureUrl(objectName, options)

Get a signature url to download the file.

Arguments

  • objectName (String): The object name.
  • [options (Object)]:
    • [options.expires (Number)]: The url expires (unit: seconds).

Return

  • (String)

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].