plainblack.com
Username Password
search
Bookmark and Share

    

File Upload within macro

User martien
Date 3/22/2016 2:18 pm
Views 1352
Rating 2    Rate [
|
]
Previous · Next
User Message
martien

Hi all,


I should like to iupload a file from within a macro.

Using

my $f = WebGUI::HTMLForm->new($session);
$f->file( name => "csv_file_local", label => "Csv File (local)" );
$f->submit;
return $f->print . "</form></div>";

just doesn't work.

I see the data going to the server (Firebug) as posted within "csv_file_local_file" but I can't get them.

Can anyone advise me, how to get that working?


Thanks in advance,
Martien

--- (Edited on 2016-03-22 20:18 [GMT+0100] by martien) ---



Back to Top
Rate [
|
]
 
 
martien

I found it:

        my $tempStorage = WebGUI::Storage->createTemp($session);
        $tempStorage->addFileFromFormPost( "csv_file_local_file", 1 );

did the job.

--- (Edited on 2016-03-23 00:52 [GMT+0100] by martien) ---



Back to Top
Rate [
|
]
 
 
    



© 2018 Plain Black Corporation | All Rights Reserved