SWFUpload on mysource matrix


(L5x12w19) #1

out of curiosity is it possible to integrate swfupload in matrix?


(Nic Hubbard) #2

[quote]
out of curiosity is it possible to integrate swfupload in matrix?

[/quote]



Sure, the example that I gave in your other post uses jQuery and swfupload to allow multiple file uploading for an asset builder.


(L5x12w19) #3

[quote]
Sure, the example that I gave in your other post uses jQuery and swfupload to allow multiple file uploading for an asset builder.

[/quote]



yeah i have seen you post. what my client wants is to able to pick more than one file when i open the browse button like the swfupload demo does.


(Nic Hubbard) #4

[quote]
yeah i have seen you post. what my client wants is to able to pick more than one file when i open the browse button like the swfupload demo does.

[/quote]



Hmm, never done that before…


(Info) #5

[quote]
Hmm, never done that before…

[/quote]



I am also looking for a way to implement the same and no luck.

Any suggestions/guidelines will be appreciated.


(Jaco Roeloffs) #6

[quote]
I am also looking for a way to implement the same and no luck.

Any suggestions/guidelines will be appreciated.

[/quote]



We managed to get SWFUpload to work. I will get some details and post here when we get a chance.


    
    var swfu;
    $(document).ready(function(){
        var settings = {
            flash_url : "%globals_asset_url:34684%", //url for the swfupload flash file
            upload_url: "%globals_asset_url:34660%",  //url for the asset builder you have setup to take your files
            /* post parameters for the asset builder snooped in firebug */
            post_params: {"AB_34660_ASSET_BUILDER_ACTION" : "create",
                          "AB_34660_ASSET_BUILDER_CREATE_TYPE" : "image",
                          "asset_action" : "create",
                          "asset_ei_screen" : "details",
                          "sq_lock_release" : "1",
                          "subgal" : "34438"}, 
            file_size_limit : "10 MB",
            file_types : "*.*",
            file_types_description : "All Files",
            file_upload_limit : 100,
            file_queue_limit : 0,
            file_post_name : "image_0",
            custom_settings : {
                progressTarget : "fsUploadProgress",
                cancelButtonId : "btnCancel"
            },
            debug: false,
    
            // Button settings
            button_image_url: "%globals_asset_url:34695%",
            button_width: "65",
            button_height: "29",
            button_placeholder_id: "spanButtonPlaceHolder",
            button_text: 'Upload',
            button_text_style: ".theFont { font-size: 16; }",
            button_text_left_padding: 12,
            button_text_top_padding: 3,
            
            // The event handler functions are defined in handlers.js
            file_queued_handler : fileQueued,
            file_queue_error_handler : fileQueueError,
            file_dialog_complete_handler : fileDialogComplete,
            upload_start_handler : uploadStart,
            upload_progress_handler : uploadProgress,
            upload_error_handler : uploadError,
            upload_success_handler : uploadSuccess,
            upload_complete_handler : uploadComplete,
            queue_complete_handler : queueComplete	// Queue plugin event
        };
    swfu = new SWFUpload(settings);


alright, been a while since I've looked at the page, but I think that should be all the javascript you need to initiate swfupload. Obviously your asset builder post parameters will probably differ - submit a file in your asset builder and snoop the details with firebug. I don't think anything specific was needed to get the html to work, I think I more or less copied from their example code. I think that should be enough to get you going, let me know if I've left anything out.

(Info) #7

Ok that is nice and is this for the Simple Upload, I am looking into the multi instant upload for Small and Large Files/Folders.


Have got some tips though from what has been stated.



Thanks and look forward for details or if I get it working shall give the details.


(Info) #8

Also for the multiple instance where we stated the Flash URL, this is picked in terms of the course but the flash file:swfupload.swf when being previewed from Matrix or Using the URL displays undefined.
Though on preview of the Flash file and clicking on Undefined it performs the Upload prompt but not when embedded on the page, Upload image based on Flash URL not displaying the Upload button.



Thanks.