0

自分のサイトに swfupload を配置しましたが、アップロードするファイルを選択した後、アップロードされたファイルを処理するページがファイルを受信しませんでした。私はswfuploadがファイルをサーバーにアップロードしていないと仮定しています...

これはjavascript /での私の簡単なコードです

var swfu;

   window.onload = function() {
   var settings = 
            {
           file_size_limit: "1000", // 200 kb
           file_types: "*.jpg;*.gif;*.png",
           file_types_description: "Image Files",
           file_upload_limit: "10",
           file_queue_limit: "10",

           upload_url: "http://localhost:4158/Membership/ExportFromFlash.aspx?action=gadget",
           flash_url: "/Html_Data/Flash/swfupload.swf",
           button_width: "100",
           button_height: "20",
           button_placeholder_id: "swfuploadContainer",
           button_text: '<span>Upload your gadgets</span>',
           button_text_style: ".theFont { font-size: 8; }",
           button_text_left_padding: 12,

           upload_error_handler: uploadError,
           upload_success_handler : uploadSuccess
           }
           swfu = new SWFUpload(settings);
       };

       function uploadError(file, errorCode, message) {
           try {
               alert(message);
           } catch (ex) {
               alert("ASDF");
               this.debug(ex);
           } 
       }
       function uploadSuccess(file, serverData) {
           try {
               alert(serverData);
               //window.navigator("/Membership/GadgetDetails.aspx");
           } catch (ex) {
               alert("A33");
               this.debug(ex);
           }
       }

Visual Studio .net を使用してページをデバッグしましたが、到達しませんでした....

4

2 に答える 2

0

アップロード URL がまだ localhost に設定されているようです。

于 2009-08-19T12:12:10.887 に答える
0

この回答で説明されているように、Flash 9.x/10.x では関数を呼び出すことができません。そのため、Flash コントロールを表示してクリック可能にする必要があります。

Google Mail は、[ファイルを添付] ボタンを通常のハイパーリンクとして作成しているようですが、(透明な) Flash オブジェクトをその上に (z オーダーに関して) 配置しているため、ユーザーにHTML ハイパーリンクが表示されますが、Flash オブジェクトはクリックされます。

于 2009-10-25T09:46:17.210 に答える