in reply to Re^3: LWP::Useragent - File Upload
in thread LWP::Useragent - File Upload
As I spent hours to make it finally work, here my working solution:
my $ua = LWP::UserAgent->new(); my $url = "http://your_url"; my $filename = "d:\\clips\\videoclip.mp4"; my $response = $ua->post($url, ['file' => [ $filename ]], 'Content_Type' => 'form-data' # add here more header paramete +rs if necessary );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: LWP::Useragent - File Upload
by choroba (Cardinal) on Jun 23, 2020 at 14:39 UTC | |
by jdporter (Paladin) on Jun 24, 2020 at 14:19 UTC |
In Section
Seekers of Perl Wisdom