3

plupload を使用して 2 つのファイルを Web サービスに送信したいと考えています。このサービスは、xsd タイプの 2 つのファイルを想定しています。また、最初の入力フィールドの名前が「sourceSchema」、2 番目の入力フィールドの名前が「targetSchema」になるようにファイルを受け取る必要があります。

plupload がこれらのファイルを送信する方法を明確にすることができれば幸いです。入力フィールドの名前を変更できますか。フォームはどのように送信されますか?

私のコードは次のとおりです。

// Setup html5 version
$("#html5_uploader").pluploadQueue({
    // General settings
    runtimes : 'html5',
    url : schemaMatchingUrl,
    unique_names : true,
    filters : [ {
        title : "Excel sheets",
        extensions : "xls,csv,xlsx"
    }, {
        title : "XSD files",
        extensions : "xsd"
    } ],

// Resize images on clientside if we can
resize : {
    width : 320,
    height : 240,
    quality : 90
},
init : {
    FilesAdded: function(up, files) {
      plupload.each(files, function(file) {
        if (up.files.length > 2) {
            alert("Sorry .. Maximum two files are allowed !!");
          up.removeFile(file);
        }
      });
      if (up.files.length >= 2) {
        $('#pickfiles').hide('slow');
      }
    },
    FilesRemoved: function(up, files) {
      if (up.files.length < 2) {
        $('#pickfiles').fadeIn('slow');
      }
    }
  },
  multi_selection: false
});
4

0 に答える 0