Make file size limit configurable

This commit is contained in:
leigh-mil
2020-01-27 15:46:33 -05:00
parent 62d8a89eb1
commit dff9924c95
9 changed files with 31 additions and 13 deletions

View File

@@ -20,6 +20,9 @@ export default {
portfolioId: {
type: String,
},
sizeLimit: {
type: String,
},
},
data: function() {
@@ -31,6 +34,7 @@ export default {
sizeError: false,
filenameError: false,
downloadLink: '',
fileSizeLimit: parseInt(this.sizeLimit),
}
},
@@ -48,7 +52,7 @@ export default {
this.clearErrors()
const file = e.target.files[0]
if (file.size > 64000000) {
if (file.size > this.fileSizeLimit) {
this.sizeError = true
return
}