mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
filename of downloaded image changed
This commit is contained in:
parent
6ff02b41c8
commit
3ba72526b9
@ -42,6 +42,7 @@ script:
|
||||
- docker-compose exec webapp yarn run lint
|
||||
- docker-compose exec webapp yarn run test --ci --verbose=false --coverage
|
||||
# Fullstack
|
||||
# disable for last deploy, because of flakiness!
|
||||
# - docker-compose down
|
||||
# - docker-compose -f docker-compose.yml up -d
|
||||
# - wait-on http://localhost:7474
|
||||
|
||||
@ -50,10 +50,10 @@ export default {
|
||||
},
|
||||
downloadImage({ url }) {
|
||||
this.$axios.get(url, { responseType: 'blob' }).then((response) => {
|
||||
const blob = new Blob([response.data], { type: 'application/pdf' })
|
||||
const blob = new Blob([response.data])
|
||||
const link = document.createElement('a')
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = url
|
||||
link.download = url.replace(/^.+\//g, '')
|
||||
link.click()
|
||||
URL.revokeObjectURL(link.href)
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user