“滴答声"指示dropzone的标记未显示? [英] The "tick" mark of dropzone is not showing?

查看:70
本文介绍了“滴答声"指示dropzone的标记未显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用dropzone在本地主机上上传图像文件.一切正常,文件正在上载和保存,但是进度条并没有被勾号代替.它留在那里. 这是截图

I have been using dropzone to upload the image file on my localhost. Everything is working fine, file is being uploaded and saved, however, the progress bar is not replaced by the tick mark. It stays there. Here is a screenshot

在这种情况下可能是什么问题,这是我的dropzone代码

What could be the problem in this case, here is my dropzone code

 Dropzone.options.myAwesomeDropzone = {
        paramName: "userPhoto", // The name that will be used to transfer the file
        maxFilesize: 20, // MB
        maxFiles: 1,
        acceptedFiles: ".jpeg,.jpg",
        dictDefaultMessage: 'Drag an image here to upload, or click to select one',
        accept: function (file, done) {
           done();
        },

    };

推荐答案

在路线末端使用res.end('File have been uploded').使用dropzone时,如果未触发res.end,则不会确认文件已上传.因此,动画无法正常播放

use res.end('File have been uploded') at the end of your route. When using dropzone, it doesn't acknowledge that the file has been uploaded if res.end is not fired. Hence the animation was not working

这篇关于“滴答声"指示dropzone的标记未显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆