New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

static-upload

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

static-upload

static-upload 静态资源上传服务 目前支持阿里云oss 七牛云 以及自己本身服务器

latest
npmnpm
Version
1.0.28
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

static-upload 静态资源上传服务 目前支持阿里云oss 七牛云 以及自己本身服务器

使用方法

npm i static-upload --save

引入依赖

const {staticUpload} = require('static-upload')

参数说明

QiniuConfig 七牛上传配置

字段名描述
accessKey七牛accessKey
secretKey七牛secretKey
originPath需要上传的目录
filterFiles需要过滤的文件名集合 默认:[],如:['index.html']
zone七牛空间地域
bucket七牛bucket
debugFlag是否开启debug
Filterdirectory需要过滤的文件夹

**aliConfig ** 阿里oss上传配置

字段名描述
regionoss region
bucketoss bucket
bucketPath需要上传的oss指定目录
originPath本地需要上传的目录
filterFiles需要过滤的文件名集合 默认:[],如:['index.html']
accessKeyIdoss accessKeyId
accessKeySecretoss accessKeySecret
Filterdirectory需要过滤的文件夹

serveConfig 云服务器上传配置

字段名描述
ip服务器ip
port服务器端口
username服务器用户名(一般为root)
password服务器登录用户名
locationUrl本地需要上传文件的url
serverUrl上传文件的服务器路径
isGzip是否是压缩包

使用方法

const uploadServe= new staticUpload({
  QiniuConfig:{
    //七牛配置
  },
  aliConfig:{
    // 阿里oss配置
  },
  serveConfig:{
    //自身服务器配置
  }
})
//上传到七牛
uploadServe.qiniuUpload()
//上传到阿里
uploadServe.aliUpload()

七牛或者阿里云oss 上传完毕后会调用云服务器上传 如不需要云服务器上传

serveConfig不配置即可

FAQs

Package last updated on 08 Dec 2024

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