jQuery-File-Upload

 view release on metacpan or  search on metacpan

lib/jQuery/File/Upload.pm  view on Meta::CPAN

	my $self = shift;

	for(@{$self->scp}) {
		die "Must provide a host to scp" if $_->{host} eq '';

		$_->{thumbnail_upload_dir} = $_->{upload_dir} if $_->{thumbnail_upload_dir} eq '';

		my $path = $_->{upload_dir} . '/' . $self->filename;
		my $thumb_path = $_->{thumbnail_upload_dir} . '/' . $self->thumbnail_filename;

		if(($_->{user} ne '' and $_->{public_key} ne '' and $_->{private_key} ne '') or ($_->{user} ne '' and $_->{password} ne '')) {
			my $ssh2 = $self->_auth_user($_);

			#if it is an image, scp both file and thumbnail
			if($self->is_image) {
				$ssh2->scp_put($self->{tmp_file_path}, $path);
				$ssh2->scp_put($self->{tmp_thumb_path}, $thumb_path);
			}
			else {
				$ssh2->scp_put($self->{tmp_filename}, $path);
			}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.679 second using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )