mirror of
https://github.com/nextcloud/server.git
synced 2026-03-09 09:51:03 -04:00
fix(files): do not even try to fetch a preview if èhas-preview` is false
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
4faf51183d
commit
4ed1050ccf
1 changed files with 12 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
class="files-list__row-icon-blurhash"
|
||||
aria-hidden="true" />
|
||||
<img v-if="backgroundFailed !== true"
|
||||
:key="source.fileid"
|
||||
ref="previewImg"
|
||||
alt=""
|
||||
class="files-list__row-icon-preview"
|
||||
|
|
@ -147,6 +148,17 @@ export default defineComponent({
|
|||
return null
|
||||
}
|
||||
|
||||
if (this.source.attributes['has-preview'] !== true
|
||||
&& this.source.mime !== undefined
|
||||
&& this.source.mime !== 'application/octet-stream'
|
||||
) {
|
||||
const previewUrl = generateUrl('/core/mimeicon?mime={mime}', {
|
||||
mime: this.source.mime,
|
||||
})
|
||||
const url = new URL(window.location.origin + previewUrl)
|
||||
return url.href
|
||||
}
|
||||
|
||||
try {
|
||||
const previewUrl = this.source.attributes.previewUrl
|
||||
|| (this.isPublic
|
||||
|
|
|
|||
Loading…
Reference in a new issue