mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-22 09:48:06 +00:00
website: also escape output in dragdrop example
This commit is contained in:
parent
3286f935e9
commit
4ff28bee2a
1 changed files with 8 additions and 2 deletions
|
|
@ -11,8 +11,14 @@ const onUploadSuccess = (elForUploadedFiles) =>
|
|||
const url = response.uploadURL
|
||||
const fileName = file.name
|
||||
|
||||
document.querySelector(elForUploadedFiles).innerHTML +=
|
||||
`<li><a href="${url}" target="_blank">${fileName}</a></li>`
|
||||
const li = document.createElement('li')
|
||||
const a = document.createElement('a')
|
||||
a.href = url
|
||||
a.target = '_blank'
|
||||
a.appendChild(document.createTextNode(fileName))
|
||||
li.appendChild(a)
|
||||
|
||||
document.querySelector(elForUploadedFiles).appendChild(li)
|
||||
}
|
||||
|
||||
const uppyOne = new Uppy({ debug: true, autoProceed: true })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue