# qiniu-file-manager

> 使用`ES2016 promise`来操作文件的上传、下载、删除等操作，使用该工具可以不必熟读七牛官方`SDK`开发者文档，但是也需要了解一些基本知识，所以你也可去qiniu官方查看[七牛云官方SDK](https://developer.qiniu.com/sdk#official-sdk)。

Latest version **0.0.1** (published 2020-01-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install qiniu-file-manager
pnpm add qiniu-file-manager
yarn add qiniu-file-manager
bun add qiniu-file-manager
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-01-11 |
| First published | 2020-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | chenchao |
| Maintainers | chaochan |
| Keywords | qiniu, upload, node-qiniu, qiniu-sdk, promise |

## Links

- npm: https://www.npmjs.com/package/qiniu-file-manager
- npm.io page: https://npm.io/package/qiniu-file-manager

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.19.1
- [qiniu](https://npm.io/package/qiniu.md) ^7.3.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-01-11

## README

## 七牛云文件操作工具

使用`ES2016 promise`来操作文件的上传、下载、删除等操作，使用该工具可以不必熟读七牛官方`SDK`开发者文档，但是也需要了解一些基本知识，所以你也可去qiniu官方查看[七牛云官方SDK](https://developer.qiniu.com/sdk#official-sdk)。

## 支持操作

- 获取bucket下的public链接
- 获取文件的下载链接
- 上传文件
- 下载文件
- 删除文件
- 修改文件
- 查看文件是否存在

## 环境

- `node`

## 安装

```bash
npm install qiniu-file-manager -S
```

## 使用

```javascript
const QiniuManager = require('qiniu-file-manager')

const accessKey = "your accessKey"
const secretKey = "your secretKey'
const bucketName = "your bucketname"
const zone = "your bucket zone" // 可以查看Zone对象和机房的对应关系

const manager = new QiniuManager(accessKey, secretKey, bucketName, zone)

// 上传文件
const key = 'cr.js'
const loaclPath = "/usr/temp/xxx"
manager.uploadFile(key, localPath).then(res => {
  // do...
})
```

---
_Source: https://npm.io/package/qiniu-file-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
