mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
Shared pages refactoring part 1
This commit is contained in:
5
resources/js/helpers/functionHelpers.js
vendored
5
resources/js/helpers/functionHelpers.js
vendored
@@ -267,16 +267,15 @@ const FunctionHelpers = {
|
||||
|
||||
Vue.prototype.$downloadFile = function (url, filename) {
|
||||
// Show alert message when download is disabled
|
||||
if (!store.getters.user.data.meta.restrictions.canDownload) {
|
||||
if (store.getters.user && !store.getters.user.data.meta.restrictions.canDownload) {
|
||||
Vue.prototype.$temporarilyDisabledDownload()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
var anchor = document.createElement('a')
|
||||
let anchor = document.createElement('a')
|
||||
|
||||
anchor.href = url
|
||||
|
||||
anchor.download = filename
|
||||
|
||||
document.body.appendChild(anchor)
|
||||
|
||||
Reference in New Issue
Block a user