JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q28516F
  • License MIT

实现前端文件上传,分片上传的插件

Package Exports

  • js-upload-file
  • js-upload-file/dist/js-upload-file.min.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-upload-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

js-upload-file

npm-package npm-publish size license last-commit

实现前端文件上传,分片上传,多文件同时上传,暂停及续传;
但上传按钮样式及上传文件类型,大小等需要自行控制及校验;

详细文档

安装

npm install js-upload-file
# or
yarn add js-upload-file

使用

模块

// es
import JsUploadFile from 'js-upload-file'
const myUpload = new JsUploadFile({
  server: '上传接口'
})

// commonjS
const JsUploadFile = require('js-upload-file')
const myUpload = new JsUploadFile({
  server: '上传接口'
})

// amd
require(['js-upload-file'], function (JsUploadFile) {
  const myUpload = new JsUploadFile({
    server: '上传接口'
  })
})

cdn

<script src="js-upload-file.min.js"></script>
<script>
  const myUpload = new JsUploadFile({
    server: '上传接口'
  })
</script>