uppy/examples/cdn-example/index.html
Daniel Escobedo 5420bcca75
Removed Redundant Plugin Inclusion
Informer is already included in the Dashboard plugin.
2018-01-03 16:18:47 -08:00

34 lines
978 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://unpkg.com/uppy/dist/uppy.min.css" rel="stylesheet">
</head>
<body>
<button id="uppyModalOpener">Open Modal</button>
<script src="https://unpkg.com/uppy/dist/uppy.min.js"></script>
<script>
const Dashboard = Uppy.Dashboard
const Webcam = Uppy.Webcam
const Tus = Uppy.Tus
const uppy = Uppy.Core({debug: true, autoProceed: false})
.use(Uppy.Dashboard, {
trigger: '#uppyModalOpener',
target: 'body'
})
.use(Webcam, {target: Dashboard})
.use(Tus, {endpoint: 'https://master.tus.io/files/', resume: true})
uppy.run()
uppy.on('success', (fileCount) => {
console.log(`${fileCount} files uploaded`)
})
document.querySelector('#uppyModalOpener').click()
</script>
</body>
</html>