fix filemanager thumbnails

This commit is contained in:
Simon Vieille 2021-10-06 10:22:04 +02:00
parent e42860ac5b
commit 601363f7e5
2 changed files with 6 additions and 2 deletions

View file

@ -54,6 +54,7 @@ export default {
} }
if (['image/png', 'image/jpg', 'image/jpeg', 'image/gif'].indexOf(this.mime) === -1) { if (['image/png', 'image/jpg', 'image/jpeg', 'image/gif'].indexOf(this.mime) === -1) {
this.thumbnail = null
return return
} }

View file

@ -273,11 +273,14 @@ export default {
refresh () { refresh () {
const that = this const that = this
this.isLoading = true this.isLoading = true
this.files = []
this.directories = []
axios.get(Routing.generate('admin_file_manager_api_directory', { axios.get(Routing.generate('admin_file_manager_api_directory', {
directory: that.directory, directory: that.directory,
context: that.context, context: that.context,
ajax: this.ajax ajax: this.ajax,
time: Date.now(),
})) }))
.then((response) => { .then((response) => {
that.buildBreadcrum(response.data.breadcrumb) that.buildBreadcrum(response.data.breadcrumb)
@ -293,7 +296,7 @@ export default {
null, null,
'', '',
window.location.pathname + '?' + query.toString() window.location.pathname + '?' + query.toString()
) )
}) })
.catch((e) => { .catch((e) => {
alert('An error occured') alert('An error occured')