Server responded with 0 code issue in Dropzone.js
Asked Answered
C

5

5

Im used Dropzone.js, I Have some issue for this, I'm uploaded some image,after displayed this error Server responded with 0 code. look at my attached image you can understand it enter image description here

html code

 <form action="/file-upload" class="dropzone"><div class="fallback">
    <input name="file" type="file" multiple />
  </div></form>
Capua answered 15/12, 2017 at 5:0 Comment(0)
C
5

This issue can have several reasons. How big are the files you are uploading? How long does the server execute a script? Which maximum file sizes are allowed to upload? I assume, this will be mainly an issue of the webserver settings instead of dropzone.js.

See this link for some ideas:

https://github.com/enyo/dropzone/issues/701

Chimb answered 19/12, 2017 at 10:1 Comment(2)
Actually I don't know what happened to the issue on github. The issue on the github page seems to be gone. github.com/enyo/dropzoneChimb
they migrate to gitlabCarrageen
D
2

For me it was a browser issue because i was using dropzone.js on three different sections. For two of them it was working fine but after adding a third one, the third was giving me the error. But after trying it on a different browser it was okay.

Delindadelineate answered 12/9, 2019 at 8:26 Comment(0)
F
2

I also faced this issue. It was related to running the script on a non HTTPS website. Once I switched from http to https it started to work properly. Thought it might be helpful for some of you guys.

Flattery answered 18/5, 2020 at 15:44 Comment(2)
You are right it's working for me also after switchingPyrophyllite
@IslamEmam Glad to hear!Flattery
R
1

Check the config file and the base url name. If your website has SSL it should be https:// and if not it should be http://

Reis answered 30/12, 2022 at 21:18 Comment(1)
Your answer is exactly like @aiddev's answer, please check other answers to avoid posting duplicate answers.Bioecology
C
0

For me it was because of I had Dropzone.js in Sub Domain and form action (server side php script for file upload) was an address in main Domain.

upload script and dropzone form must be in same domains.

update: I think it's also possible for different domains with setting header Access-Control-Allow-Headers in dropzone header config.

Carrageen answered 5/4, 2020 at 14:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.