如何从显示进度框中停止Uploadify

时间:2012-04-29 21:17:24

标签: javascript jquery uploadify image-uploading

正如标题所说,我似乎无法让Uploadify在上传过程中停止显示进度框。这就是我所拥有的:

$('#imageupload').uploadify({
                'swf'      : 'scripts/uploadify/uploadify.swf',
                'uploader' : 'scripts/uploadify/uploadify.php',
                // Put your options here
                'buttonText' : 'Select Image',
                'uploadLimit' : 999,
                'overrideEvents' : ['onUploadProgress'],
                'multi' : false,
                'formData'      : {'yourid' : '<?=@(int)$_SESSION['user']?>'},
                'fileSizeLimit' : '2MB',
                'fileTypeExts' : '*.gif; *.jpg; *.png; *.JPG; *jpeg',
                'fileTypeDesc' : 'Image Files',
                'onUploadStart' : function(file) {
                    $("#imageupload").uploadify("settings", "formData", {'yourid' : $(".userid").attr("id")});
                    $(".imageuploadbox #imagepercent").css("display", "inline");
                },
                'onUploadSuccess' : function(file) {
                    var currenttime = new Date();
                    $("img#yourprofilepic").attr("src", "images/artist_pictures/thumbs/artist_8.jpg?"+currenttime);
                },
                'onUploadProgress' : function(file, bytesUploaded, bytesTotal, totalBytesUploaded, totalBytesTotal) {
                    var percentcomp = (100*(totalBytesTotal/totalBytesUploaded)).toFixed(0);
                    $('.imageuploadbox #imagepercent #percentcomplete').html(percentcomp);
                } 
            });

2 个答案:

答案 0 :(得分:3)

这很简单,试试这个:

删除上传css的链接,然后将其添加到您的css中:

.uploadifyQueue
{
display:none;
}

答案 1 :(得分:0)

似乎名字已经改变了,这个对我有用:

#upload_pc-queue{
    display:none;
}