我有这个带有图像上传的项目,我使用Uppy
它。这是我的代码:
...
<div id="drag-drop-area" name="fotografije[]"></div>
<script src="https://transloadit.edgly.net/releases/uppy/v1.6.0/uppy.min.js"></script>
<script>
var uppy = Uppy.Core()
.use(Uppy.Dashboard, {
inline: true,
target: '#drag-drop-area'
})
.use(Uppy.Tus, {endpoint: 'https://master.tus.io/files/'}) //you can put upload URL here, where you want to upload images
uppy.on('complete', (result) => {
console.log('Upload complete! We’ve uploaded these files:', result.successful)
})
</script>
...
我试过name="fotografije[]"
indiv
但当然没有帮助。我只需要命名这个输入,以便我的图像可以上传到服务器。我该怎么做Uppy
?