如何在Uploadify中添加cancelImg [英] How to add cancelImg in Uploadify

查看:14
本文介绍了如何在Uploadify中添加cancelImg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Uploadify 的许多在线示例中,您会看到在 javascript 插件中使用的一个名为cancelImg"的属性,您可以在其中指定用于 Flash 控件中取消按钮"的小 X,以防万一想取消上传.这样做对我不起作用(没有图像或取消按钮出现,虽然有一个隐形取消按钮"可以点击取消上传)而且官方文档实际上甚至没有指定存在这样的一个属性.

In many of the online examples for Uploadify, you'll see a property used in the javascript plugin called "cancelImg" where you specify the little X used for the "cancel button" in the flash control, in the event that you want to cancel an upload. Doing it that way didn't work for me (no image or cancel button appears, although there is an "invisible cancel button" that you can click to cancel the upload) and the official documentation actually doesn't even specify that there exists such a property.

有谁知道如何在我上传文件时让取消按钮显示在 Flash 控件中?使用包含的 uploadify-cancel.png 就可以了.

Does anyone know how I can get the cancel button to show up in the flash control while I'm uploading files? Using the included uploadify-cancel.png would be just fine.

更新:这是闪光灯控件的外观.您可以看到右侧没有取消按钮:

Update: Here is how the flash control looks. You can see there are no cancel buttons on the right-hand side:

这是我的代码:

 $(document).ready(function () {
                $("#file_upload").uploadify({
                    uploader: '@Url.Action("UploadFile", "Home")',
                    swf: '@Url.Content("~/Scripts/Uploadify/uploadify.swf")',
                    cancelImg: '@Url.Content("~/Scripts/Uploadify/uploadify-cancel.png")',
                    removeCompleted: false
                });
            });

谢谢,杰

推荐答案

嗯...最后一个帖子并没有真正回答你的问题.

Hmm...the last post doesn't really answer your question.

我遇到了同样的问题,解决方案只是在uploadify.css(或任何uploadify CSS文件的名称)中编辑取消图像的文件名/路径.我发现那里的路径不正确所以不管你在cancelImg之后有什么:在你的jquery代码中,如果CSS文件中的文件名/路径是错误的,取消图像(通常是一个十字)将不会显示.

I had the same problem, and the solution was just to edit the file name/path for the cancel image in uploadify.css (or whatever the name of your uploadify CSS file is.) I found that the path there was incorrect so regardless of what you have after cancelImg: in your jquery code, if the filename/path is wrong in the CSS file, the cancel image (usually a cross) won't show.

希望对您有所帮助.

这篇关于如何在Uploadify中添加cancelImg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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