在null错误上调用成员函数getClientOriginalName()

时间:2019-01-23 09:30:57

标签: laravel

dropzone未在控制器上发送文件名

<form  method="post" action="{{ route('student.profile.update',$student->id) }}" enctype="multipart/form-data" class=dropzone id="dropzone" files = true >


 Dropzone.options.dropzone =
            {
                maxFilesize: 12,
                renameFile: function (file) {
                    var dt = new Date();
                    var time = dt.getTime();
                    return time + file.name;
                },
                acceptedFiles: ".jpeg,.jpg,.png,.gif",
                addRemoveLinks: true,
                timeout: 5000,
                success: function (file, response) {
                    console.log(response);
                },
                error: function (file, response) {
                    return false;
                }
            }

0 个答案:

没有答案