mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 11:14:05 +00:00
Multipart example update
This commit is contained in:
parent
e0bbc16cc6
commit
8fa66ea141
2 changed files with 14 additions and 10 deletions
|
|
@ -1,18 +1,17 @@
|
|||
import Uppy from 'uppy/core'
|
||||
import { Formtag, Multipart } from 'uppy/plugins'
|
||||
import { Formtag, Multipart, Tus10, ProgressBar } from 'uppy/plugins'
|
||||
|
||||
const uppy = new Uppy({debug: true, wait: false})
|
||||
const uppy = new Uppy({debug: true, autoProceed: false})
|
||||
|
||||
uppy
|
||||
.use(Formtag, {
|
||||
selector: '#myform1 [type = "file"],#myform2 [type = "file"]',
|
||||
doneButtonSelector: '#myupload'
|
||||
})
|
||||
.use(Formtag)
|
||||
.use(Multipart, {
|
||||
endpoint: '//api2.transloadit.com',
|
||||
bundle: true,
|
||||
fieldName: 'files[]'
|
||||
})
|
||||
.use(ProgressBar, {target: 'body'})
|
||||
// .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
|
||||
.run()
|
||||
|
||||
console.log('Uppy ' + uppy.type + ' loaded')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
<!-- Basic Uppy styles -->
|
||||
<link rel="stylesheet" href="/uppy/uppy.css">
|
||||
|
||||
<div class="grid">
|
||||
<form class="UppyForm" action="//api2.transloadit.com">
|
||||
<input type="file" name="files[]" multiple="">
|
||||
<button type="submit">Upload</button>
|
||||
</form>
|
||||
|
||||
<!-- <div class="grid">
|
||||
<div class="column-1-2">
|
||||
<form id="myform1">
|
||||
<input id="myfile1" type="file" name="myfile" multiple />
|
||||
|
|
@ -13,8 +18,8 @@
|
|||
<input id="myfile2" type="file" name="myfile" multiple />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<button id="myupload">
|
||||
<!-- <button id="myupload">
|
||||
Upload
|
||||
</button>
|
||||
</button> -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue