mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
31 lines
759 B
Text
31 lines
759 B
Text
---
|
|
layout: false
|
|
---
|
|
<!--
|
|
You can `npm run web:inject-frontpagecodesample` to render this code snippet and
|
|
save it as a layout partial
|
|
-->
|
|
{% codeblock lang:bash %}
|
|
$ npm install @uppy/core @uppy/dashboard @uppy/instagram @uppy/tus
|
|
{% endcodeblock %}
|
|
|
|
{% codeblock lang:js %}
|
|
import Uppy from '@uppy/core'
|
|
import Dashboard from '@uppy/dashboard'
|
|
import Instagram from '@uppy/instagram'
|
|
import Tus from '@uppy/tus'
|
|
|
|
Uppy()
|
|
.use(Dashboard, {
|
|
trigger: '#select-files',
|
|
showProgressDetails: true
|
|
})
|
|
.use(Instagram, {
|
|
target: Dashboard,
|
|
companionUrl: 'https://companion.uppy.io'
|
|
})
|
|
.use(Tus, { endpoint: 'https://master.tus.io/files/' })
|
|
.on('complete', (result) => {
|
|
console.log('Upload result:', result)
|
|
})
|
|
{% endcodeblock %}
|