uppy/website/src/frontpage-code-sample.ejs
Antoine du Hamel 01d7ea13e9
meta: use Yarn v3 instead of npm (#3237)
* meta: use Yarn v3 instead of npm

* Update CONTRIBUTING.md to fix linter errors

* remove remaining npm commands

* Update deps
2021-10-20 15:16:59 +02:00

32 lines
777 B
Text

---
layout: false
no-emoji: true
---
<!--
You can `yarn 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://tusd.tusdemo.net/files/' })
.on('complete', (result) => {
console.log('Upload result:', result)
})
{% endcodeblock %}