Socket
Book a DemoInstallSign in
Socket

koa-file-upload-fork

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-file-upload-fork

koa middleware use upload file

latest
npmnpm
Version
1.0.0-beta.7
Version published
Maintainers
1
Created
Source

koa-file-upload-nextcloud

koa2 middle to upload file, 支持本地文件系统、 nextcloud私有云

Features

  • support upload to dir
options['upload'] = {
  "url": '/api/upload',
  "storeDir": 'xxx',
  "provider": "local",
  "mimetypes": ['image/png','image/bmp'], // 如果没有配置,将不进行类型检查 http://www.freeformatter.com/mime-types-list.html
  "folder": "public",
  "urlPath": "images"
}
  • support upload to nextcloud
options["upload"] = {
  "url": "/api/upload/nc",
  "provider": "nc",
  "folder": "public/upload",
  "nc_host":"http://localhost:8089/FileStore",
  "nc_admin_user":"admin",
  "nc_admin_password":"admin",
  "nc_public_group":"share"
}

How to use

const file_uploader = require('koa-file-upload-fork')
app.use(mount(option.url,file_uploader(option).handler))

Requirements

  • Node v6.0+

Workflow

  • npm install

Keywords

koa

FAQs

Package last updated on 04 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts