0

I am using dropzone.js for uploading multiple files but getting error as following while upload

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL /file-upload was not found on this server.</p><p>Additionally,
a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p><hr><address>Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 Server at localhost Port 80</address></body></html> 

I don't what is the problem I copy the same code from codepen but getting an error please help me thank you in advance.

7
  • can u put more info like code etc to debug. Commented Sep 19, 2017 at 5:57
  • codepen.io/probil/pen/yyzdOM Commented Sep 19, 2017 at 5:59
  • this is the link from where i copied the code Commented Sep 19, 2017 at 5:59
  • u should add url in dropzone initialization Commented Sep 19, 2017 at 6:07
  • how to add url ? Commented Sep 19, 2017 at 6:08

1 Answer 1

2

Try to put url in initialization

$(function(){
      Dropzone.options.myAwesomeDropzone = {
        maxFilesize: 5,
        ....
        url: /url_to_upload_file,

        init:function(){
          ...
        }
      };
    })
Sign up to request clarification or add additional context in comments.

4 Comments

$(function(){ Dropzone.options.myAwesomeDropzone = { maxFilesize: 5, addRemoveLinks: true, url: /images/, dictResponseError: 'Server not Configured', acceptedFiles: ".png,.jpg,.gif,.bmp,.jpeg", init:function(){
still, same error is there any need of any backend code for this because i am only doing front-end I did not write any code in the backend .
you should write backend code. Once you upload file it will hit the url in server that you mentioned as url in initialization.Otherwise it will throw error and u see red as progress bar in file.
thank you, i think I should have write backend code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.