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

w-web-uploader

v0.1.3

Published

基于Vue,ElementUi,webuploader 开发的分片上传插件

Downloads

14

Readme

VueWebUpload

基于Vue+webuploader+element-ui的文件分片上传,

插件使用

npm i w-web-uploader --save

组件内使用

<VueWebUpload 
    checkUrl="/storage/fdfs/checkFile" 
    uploadUrl="/storage/fdfs/batchPeaceUpload"
    tip="请选择上传的文件,大小500M以内"
    :headers="{ 'Authorization': 'Bearer 2741145f-0065-4e37-9e24-a6d42ca22254'}"
    :auto-upload="true" 
    :size-limit="500*1024*1024" 
    :chunk-size="1*1024*1024" 
    :on-success="uploadSuccess"
    :on-remove="uploadRemove" 
    :file-list="fileList"
    ></VueWebUpload>

返回参数

  • checkUrl: 返回数据:
{
code: 101
data: {}
msg: "文件已经上传"
}

101 // 忽略上传过程,直接标识上传成功;

100 // 文件不存在,从新上传

102 //部分文件上传,但是差几个模块。({code:102,data:{chunkCurr:1}}) ,chunkCurr第几个片段

方法参数

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | ---- | ---- | :----: | :----: | :----: | | checkUrl | md5校验接口 |String | — | — | | uploadUrl | 文件分片上传接口 |String | — | — | | tip | 底部信息提示 | String | — | — | | headers | 设置上传的请求头部 | Object | — | — | | auto-upload | 是否在选取文件后立即进行上传 | Boolean | — | true | | accept | 接受上传的文件类型 | String | text,vide,image | — | | size-limit | 文件大小限制(byte) | Number | — | 500M | | chunk-size | 分片大小(byte) | Number | — | 1M | | on-success | 文件上传成功时的钩子 | function(response, file, fileList) | — | — | | on-complete | 文件上传完成后的钩子 | function(file, fileList) | — | — | | on-remove | 文件移除的时候 | function(file, fileList) | — | — | | on-remove | 文件移除的时候 | function(file, fileList) | — | — | | on-change | 添加文件时的钩子函数,文件添加上传队列前 | function(file, fileList) | — | — | | file-list | 上传的文件列表 | Array | — | — | | limit | 最大允许上传个数 | Number | — | 10 |