mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fix(webapp): filenames for chat files (#8680)
* filenames for chat files * remove console log
This commit is contained in:
parent
7763ca6a7d
commit
6956473ea5
@ -376,7 +376,7 @@ export default {
|
||||
|
||||
const filesToUpload = hasFiles
|
||||
? files.map((file) => ({
|
||||
upload: file.blob,
|
||||
upload: new File([file.blob], `${file.name}.${file.extension}`),
|
||||
name: file.name,
|
||||
type: file.type,
|
||||
}))
|
||||
@ -494,7 +494,7 @@ export default {
|
||||
const objectURL = window.URL.createObjectURL(blob)
|
||||
const downloadLink = document.createElement('a')
|
||||
downloadLink.href = objectURL
|
||||
downloadLink.download = `${file.name}.${file.type.split('/')[1]}`
|
||||
downloadLink.download = `${file.name}.${file.url.split('.').slice(-1).pop()}`
|
||||
downloadLink.style.display = 'none'
|
||||
document.body.appendChild(downloadLink)
|
||||
downloadLink.click()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user