mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
name of downloaded image is the same as the url in the exported json
This commit is contained in:
parent
a6f87a394a
commit
6ff02b41c8
@ -48,12 +48,12 @@ export default {
|
||||
document.body.appendChild(fileLink)
|
||||
fileLink.click()
|
||||
},
|
||||
downloadImage({ url, title }) {
|
||||
downloadImage({ url }) {
|
||||
this.$axios.get(url, { responseType: 'blob' }).then((response) => {
|
||||
const blob = new Blob([response.data], { type: 'application/pdf' })
|
||||
const link = document.createElement('a')
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = title
|
||||
link.download = url
|
||||
link.click()
|
||||
URL.revokeObjectURL(link.href)
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user