Platinum Partner

Simple FileFactory File Upload Tool


#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;

if ($#ARGV == -1)
{
        print "syntax: $0 \n";
        exit();
}

my $ua = LWP::UserAgent->new;
$ua->timeout(15);
$ua->requests_redirectable(['GET','POST']);
$ua->max_redirect(1);

my $response = $ua->get('http://www.filefactory.com/');
catch_unsuccess($response);
if ($response->content !~ /
/) { print STDERR "unable to initiate upload\n"; exit(1); } $response = $ua->post($1, ['redirect' => '1', 'file' => [$ARGV[0]]], 'content_type' => 'multipart/form-data'); catch_unsuccess($response); if ($response->content =~ //) { printf("upload successful!\n%s\n", $1); } sub catch_unsuccess { my ($response) = @_; if (!$response->is_success) { print STDERR $response->status_line . "\n"; exit(1); } }
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}