Uppy 模块化文件上传组件 项目简介
Uppy 是一个流行的模块化文件上传组件,可无缝集成任何框架。它可从本地磁盘、Google 云端硬盘、Dropbox、Instagram、远程 URL、摄像机和其他位置提取文件,然后将其上传到最终目的地。它非常快速并且易于使用。Uppy 是由一个核心模块和其它用于选择、操作、上传等功能的插件组成。const Uppy = require('uppy/lib/core')
const Dashboard = require('uppy/lib/plugins/Dashboard')
const Tus = require('uppy/lib/plugins/Tus')
const uppy = Uppy({ autoProceed: false })
.use(Dashboard, {
trigger: '#select-files'
})
.use(Tus, {endpoint: '//master.tus.io/files/'})
.run()
uppy.on('complete', (result) => {
console.log(`Upload complete! We’ve uploaded these files: ${result.successful}`)
})
const Dashboard = require('uppy/lib/plugins/Dashboard')
const Tus = require('uppy/lib/plugins/Tus')
const uppy = Uppy({ autoProceed: false })
.use(Dashboard, {
trigger: '#select-files'
})
.use(Tus, {endpoint: '//master.tus.io/files/'})
.run()
uppy.on('complete', (result) => {
console.log(`Upload complete! We’ve uploaded these files: ${result.successful}`)
})