Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

fix: #228 #234

Merged
merged 1 commit into from
Aug 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/components/Upload/FilePondUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ export default {
computed: {
...mapGetters(['options']),
maxParallelUploads() {
if (this.options && this.options.length > 0) {
if (this.options) {
return this.options.attachment_upload_max_parallel_uploads
}
return 1
},
allowImagePreview() {
if (this.options && this.options.length > 0) {
if (this.options) {
return this.options.attachment_upload_image_preview_enable
}
return false
},
maxFiles() {
if (this.options && this.options.length > 0) {
if (this.options) {
return this.options.attachment_upload_max_files
}
return 1
Expand All @@ -110,7 +110,7 @@ export default {

this.uploadHandler(
formData,
progressEvent => {
(progressEvent) => {
if (progressEvent.total > 0) {
progress(progressEvent.lengthComputable, progressEvent.loaded, progressEvent.total)
}
Expand All @@ -119,12 +119,12 @@ export default {
this.filed,
file
)
.then(response => {
.then((response) => {
load(response)
this.$log.debug('Uploaded successfully', response)
this.$emit('success', response, file)
})
.catch(failure => {
.catch((failure) => {
this.$log.debug('Failed to upload file', failure)
this.$emit('failure', failure, file)
error()
Expand Down