.stix文件的文件名

时间:2014-06-16 21:31:18

标签: jquery

我正在尝试在我的Jquery上传方法中添加此特定文件扩展名(.STIX)以接受此扩展名的文件。我已经有很多其他扩展程序正在上传,基本上我正在传递文件名和扩展名。

工作示例:名称: Outlook数据文件扩展程序: pst                  名称:Excel文档扩展程序: xls,xlsx,xlsm,xltx,xltm,xlsb,xlam,csv                  名称:Word文档扩展程序: doc,docx,docm,dotx,dotm

我添加扩展名为.stix的文件,但我不确定调用这些类型的文件。我已经尝试过Stuffit X,Stuffit Expander,StuffIt文件等,但似乎没有任何工作。

这是JQuery上传方法:

bindUploader = function () {
        $("#uploader").pluploadQueue({
            // General settings
            runtimes: config.runtimes,
            url: '/safesend/upload.ashx' + '?id=' + config.id, /**/
            max_file_size: config.maxFileSize,
            chunk_size: config.chunkSize,
            unique_names: false,
            headers: { '__AntiForgeryToken': config.requestToken },

            // Browse filters
            filters: [
                { title: "All files", extensions: "*.*" },
                { title: "Image files", extensions: "jpg,gif,png,tiff" },
                { title: "XML files", extensions: "xml" },
                { title: "PDF documents", extensions: "pdf" },
                { title: "Zip files", extensions: "zip" },
                { title: "Text files", extensions: "txt,log" },
                { title: "Powerpoint documents", extensions: "ppt,pptx,pptm,potx,potm,ppam,ppsx,ppsm,sldx,sldm,thmx" },
                { title: "Excel documents", extensions: "xls,xlsx,xlsm,xltx,xltm,xlsb,xlam,csv" },
                { title: "Word documents", extensions: "doc,docx,docm,dotx,dotm" },
                { title: "Outlook data files", extensions: "pst" },
                { title: "StuffIt files", extensions: "stix" },
            ],
            preinit: {
                Init: function (up, info) {
                    $('.plupload_header, .plupload_start').remove();
                }
            },
            init: {
                UploadProgress: function (up, file) {
                    bumpProgress(up, file);
                },
                StateChanged: function (up) {
                    if (up.total && up.files && up.total.uploaded === up.files.length) {
                        var parent = $('#upload-status').parent();
                        $('#upload-status').fadeOut('slow').remove();
                        $('#send-status').appendTo(parent).fadeIn('slow');

                        __doPostBack('ctl00$Content$btnSendMessage', '');
                    }
                },
                FilesAdded: function (up, files) {
                    var i = 0;
                    while (i++ < up.files.length) {
                        $('#btnSendMessage').removeAttr("disabled");
                        var ii = i;
                        while (ii < up.files.length) {
                            if (up.files[i - 1].name == up.files[ii].name) {
                                up.removeFile(up.files[ii]);
                            } else {
                                ii++;
                            }
                        }
                    }
                },
                QueueChanged: function (up) {
                    if (up.total.size > config.maxQueueSize) {
                        $('#upload-warning-modal').modal('show');

                        if (up.total.queued - 1 >= 0) {
                            up.removeFile(up.files[up.total.queued - 1]);
                        }
                    }
                }
            },

            // Flash settings
            flash_swf_url: 'assets/js/plupload/plupload.flash.swf',

            // Silverlight settings
            silverlight_xap_url: 'assets/js/plupload/plupload.silverlight.xap'
        });
    },

请提出建议。

1 个答案:

答案 0 :(得分:0)

是的,它是sitx而不是stix。并且“StuffIt文件”适用于sitx文件。 -