views:

619

answers:

2

I have put the swfupload to my site but after choosing the files to upload, the page that handle the uploaded files didn't receive the files. I assuming the swfupload isn't uploading the files to the server ...

this is my simple code in 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);
           }
       }

I used the visual studio .net debugging the page but it didn't reach....

A: 

It looks like the upload URL is still set to localhost.

Mark Redman
I am working on the local machine.
A: 

As described in this answer, Flash 9.x/10.x does not allow to call a function. So you have to display the Flash control to make it clickable.

Google Mail seems to make the "Attach a file" button as a normal hyperlink but place a (transparent) Flash object on top (in terms of z-order) of it so the user sees the HTML hyperlink but clicks the flash object.

Uwe Keim