pqina / vue-filepond

🔌 A handy FilePond adapter component for Vue
https://pqina.nl/filepond
MIT License
1.92k stars 128 forks source link

When I deploy the project, the upload box disappears #192

Closed vahidfa closed 3 years ago

vahidfa commented 3 years ago

There is no problem when I run the project locally, but when the project is deployed, the upload box disappears.

<file-pond
ref="pond"
:name="name"
:server="server"
:instant-upload="instantUpload"
:allow-process="false"
:allow-multiple="true"
item-insert-location="after"
:label-idle="
$t(
multiple
? 'uploader.placeholder.multiple'
: 'uploader.placeholder.single'
)
"
:accepted-file-types="accept"
@addfile="addFile"
/>

data() {
return {
tempUpload,
mediaDelete,
server: {
process: (
fieldName,
file,
metadata,
load,
error,
progress,
abort,
transfer,
options
) => {
this.$store.commit('template/UPDATE_STOP', false)
const formData = new FormData()
formData.append(fieldName, file)
this.$api
.post(this.tempUpload, formData, {
onUploadProgress(e) {
progress(e.lengthComputable, e.loaded, e.total)
}
})
.then(response => {
const file = Array.isArray(response.data.data)
? response.data.data[0]
: response.data.data

          load(file.name)
          this.$emit('finish', file)
        })
        .finally(() => {
          this.$store.commit('template/UPDATE_STOP', true)
        })
rikschennink commented 3 years ago

We require the issue template to be filled out on all new issues. The issue template helps us collect all the information we need to address your submission efficiently.

The more information we have, the faster the issue can be resolved.

We will be able to more closely look at your issue once the issue template has been filled out. The issue will be closed until the above is addressed. Please leave a comment after you've updated the issue.