Merge pull request #52809 from nextcloud/fix/preview-check

This commit is contained in:
John Molakvoæ 2025-05-14 15:50:01 +02:00 committed by GitHub
commit 4635cb4b2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 3 deletions

View file

@ -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

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long