plupload上传文件后能不能返回一个上传后的返回的路径在前台怎么接收

旭超 发布于 2013/07/17 21:12
阅读 3K+
收藏 0

js上传的代码 

 $("#mail_attachments").pluploadQueue({

            // General settings
            runtimes: 'html5,flash,silverlight',
            url: '/user/manager/mail/send/email',
            max_file_size: '10mb',
            chunk_size: '1mb',
            unique_names: true,
            // Specify what files to browse for
            filters: [
                {title: "Image files", extensions: "jpg,gif,png"},
                {title: "Zip files", extensions: "zip"}
            ],
            // Flash settings
            flash_swf_url: 'lib/plupload/js/plupload.flash.swf',
            // Silverlight settings
            silverlight_xap_url: 'lib/plupload/js/plupload.silverlight.xap',
            // 参数  传输文件的属性
            multipart_params:{
                "user":"user",
                "name":"name"
            }
        });
        //* hide upload button
        $('.plupload_start').hide();


        //* hide multiupload and show after add_files link
        $(".mail_uploader").hide();
        $('.add_files').click(function (e) {
            e.preventDefault();
            $(".mail_uploader").show();
            $(this).remove();
        })


        $('#new_message_form').submit(function (e) {


            var uploader = $('#mail_attachments').pluploadQueue(); // plupload.flash.swf 的所在路径
            // Files in queue upload them first
            if (uploader.files.length > 0) {
                // When all files are uploaded submit form
                uploader.bind('StateChanged', function () {
                    if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
                        //* uncoment next line to submit form after all files are uploaded
                        //$('#new_message_form')[0].submit();
                    }
                });
                uploader.start();
            }
          return false;
        });

    }

如何接收后台返回的文件的的路劲


加载中
返回顶部
顶部