Merge pull request #39950 from nextcloud/bugfix/uncaught-preview-promise

pull/36572/head
Julius Härtl 2 years ago committed by GitHub
commit 2bb48a6dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      apps/files/src/components/FileEntry.vue
  2. 4
      dist/files-main.js
  3. 2
      dist/files-main.js.map

@ -170,7 +170,7 @@ import { CancelablePromise } from 'cancelable-promise'
import { debounce } from 'debounce'
import { emit } from '@nextcloud/event-bus'
import { extname } from 'path'
import { formatFileSize, Permission } from '@nextcloud/files'
import { formatFileSize, FileType, Permission } from '@nextcloud/files'
import { generateUrl } from '@nextcloud/router'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { translate } from '@nextcloud/l10n'
@ -395,6 +395,10 @@ export default Vue.extend({
return this.userConfig.crop_image_previews
},
previewUrl() {
if (this.source.type === FileType.Folder) {
return null
}
try {
const previewUrl = this.source.attributes.previewUrl
|| generateUrl('/core/preview?fileId={fileid}', {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save