我想使用dropzone.js上传多个文件,但收到错误

时间:2017-09-19 05:36:15

标签: jquery file file-upload dropzone.js

我使用dropzone.js上传多个文件,但在上传时收到错误消息

<!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> 

我不是什么问题我从codepen复制相同的代码但是收到错误请帮我提前谢谢。

1 个答案:

答案 0 :(得分:1)

尝试将url置于初始化

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

        init:function(){
          ...
        }
      };
    })