npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uni-cloud-storage

v0.0.2

Published

uniApp cloud storage api sdk

Downloads

68

Readme

说明📖

此SDK是对uni-app-cloud 云存储的API化

仅用于个人项目(官方明确说明不可用于图床相关操作)

官方说明:https://ask.dcloud.net.cn/article/39390

目的:此项目是有一些处理需要交给服务端进行处理所以需要客户端将文件传给服务端后判断是否需要上传等一系列操作

安装🔧

需要存在node环境 npm :

npm i uni-cloud-storage

Yarn :

yarn add uni-cloud-storage

浏览器 ( script )

<script src="https://cdn.jsdelivr.net/gh/79W/uni-cloud-storage@master/dist/index.js"></script>

使用👋

node

node环境下 file参数需要传入文件<Buffer>并且需要传递文件名称:(fileName.png)

// 导入包
const UniCloudStorage = require('uni-cloud-storage');
// 初始化(两个必传参数)
const unics = new UniCloudStorage(spaceId, clientSecret);
// 使用
unics.upload(file,fileName?):Promise
web

File类型文件直接传入就可以了无需传入文件名称

// 导入包
<script src="https://cdn.jsdelivr.net/gh/79W/uni-cloud-storage@master/dist/index.js"></script>
<script>
	  // 初始化(两个必传参数)
		const unics = new UniCloudStorage(spaceId, clientSecret);
</script>
es6

File类型文件直接传入就可以了无需传入文件名称

// 导入包
import UniCloudStorage from 'uni-cloud-storage'
成功返回值
{
    "success": true,
    "data": {
        "id": "",
        "cdnDomain": "",
        "signature": "",
        "policy": "",
        "accessKeyId": "",
        "ossPath": "021de.png",
        "host": "",
        "target": "https://vkceyugu.cdn.bspapp.com/V1de.png"
    }
}
错误返回值
{
    "success": false,
    "error":{
      "code":"uploadFileError",
      "message":"上传文件失败"
    }
}

感谢🙏

uni-app

License📖

Lexical is MIT licensed.