kuvia2/templates/file_upload.tmpl
kekskurse 75a336675d
All checks were successful
continuous-integration/drone/push Build is passing
#4 #7 Upload Images in Gallery PAge
2022-01-15 13:07:08 +01:00

41 lines
No EOL
1.4 KiB
Cheetah
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
{{template "top" .}}
<style type="text/css">
.line { width:100%; text-align:left; border-bottom: 1px solid #8f8f8f; line-height:0.1em; margin:10px 0 20px; color: #8f8f8f; }
.line span { background:#fff; padding:0 10px; margin-left: 50px; }
</style>
<link rel="stylesheet" href="/public/croppie.css" />
<script src="/public/croppie.js"></script>
<div class="container" style="margin-top: 100px;">
<div class="row">
<div class="col-md-3">
{{template "gallery_nav" .}}
</div>
<div class="col-md-9">
<div id="drag-drop-area"></div>
</div>
</div>
</div>
<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
<script>
const { Instagram } = Uppy
const { Dashboard } = Uppy
var uppy = new Uppy.Core()
.use(Uppy.Dashboard, {
inline: true,
target: '#drag-drop-area'
})
.use(Uppy.XHRUpload, {endpoint: '/file/upload?id={{.id}}'})
//.use(Instagram, { target: Dashboard, companionUrl: 'https://companion.uppy.io' })
uppy.on('complete', (result) => {
console.log('Upload complete! Weve uploaded these files:', result.successful)
})
</script>
{{template "bottom" .}}