Result:
found more than 723 distributions - search limited to the first 2001 files matching your query ( run in 3.970 )


BusyBird-Input-Feed

 view release on metacpan or  search on metacpan

t/samples/stackoverflow.atom  view on Meta::CPAN

            <category scheme="http://stackoverflow.com/tags" term="wcf" />
        <author>
            <name>Ranish</name>
            <uri>http://stackoverflow.com/users/1792110</uri>
        </author>
        <link rel="alternate" href="http://stackoverflow.com/questions/24592989/upload-multiple-files-to-server-through-wcf-service" />
        <published>2014-07-06T05:28:02Z</published>
        <updated>2014-07-06T05:28:02Z</updated>
        <summary type="html">
            

            &lt;p&gt;As per requirement, I want to upload multiple files to Server from a windows application.  I am planning to use a WCF service to upload the files. Is there any other better approach?
If possible please provide me the code samples.&lt;/p&gt;

&lt;p&gt;Thanks in Advance.&lt;/p&gt;

&lt;p&gt;Ranish&lt;/p&gt;

 view all matches for this distribution


BuzzSaw

 view release on metacpan or  search on metacpan

nonpersonal.txt  view on Meta::CPAN

system
apple
demo
public
bwadmin
upload
nologin
student
linux
jack
postmaster

nonpersonal.txt  view on Meta::CPAN

office
ubuntu
knoppix
sybase
hadoop
uploader
fedora
download
password
server
service

 view all matches for this distribution


C-Scan-Constants

 view release on metacpan or  search on metacpan

t/include/input.h  view on Meta::CPAN

#define FF_STATUS_STOPPED	0x00
#define FF_STATUS_PLAYING	0x01
#define FF_STATUS_MAX		0x01

/*
 * Structures used in ioctls to upload effects to a device
 * They are pieces of a bigger structure (called ff_effect)
 */

/*
 * All duration values are expressed in ms. Values above 32767 ms (0x7fff)

t/include/input.h  view on Meta::CPAN

 * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP,
 * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined
 * for the time being as no driver supports it yet.
 *
 * Note: the data pointed by custom_data is copied by the driver.
 * You can therefore dispose of the memory after the upload/update.
 */
struct ff_periodic_effect {
	__u16 waveform;
	__u16 period;
	__s16 magnitude;

t/include/input.h  view on Meta::CPAN


extern struct class input_class;

/**
 * struct ff_device - force-feedback part of an input device
 * @upload: Called to upload an new effect into device
 * @erase: Called to erase an effect from device
 * @playback: Called to request device to start playing specified effect
 * @set_gain: Called to set specified gain
 * @set_autocenter: Called to auto-center device
 * @destroy: called by input core when parent input device is being

t/include/input.h  view on Meta::CPAN

 * @max_effects: maximum number of effects supported by device
 * @effects: pointer to an array of effects currently loaded into device
 * @effect_owners: array of effect owners; when file handle owning
 *	an effect gets closed the effcet is automatically erased
 *
 * Every force-feedback device must implement upload() and playback()
 * methods; erase() is optional. set_gain() and set_autocenter() need
 * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER
 * bits.
 */
struct ff_device {
	int (*upload)(struct input_dev *dev, struct ff_effect *effect,
		      struct ff_effect *old);
	int (*erase)(struct input_dev *dev, int effect_id);

	int (*playback)(struct input_dev *dev, int effect_id, int value);
	void (*set_gain)(struct input_dev *dev, u16 gain);

t/include/input.h  view on Meta::CPAN

int input_ff_create(struct input_dev *dev, int max_effects);
void input_ff_destroy(struct input_dev *dev);

int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);

int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);

int input_ff_create_memless(struct input_dev *dev, void *data,
		int (*play_effect)(struct input_dev *, void *, struct ff_effect *));

 view all matches for this distribution


C-sparse

 view release on metacpan or  search on metacpan

src/sparse-0.4.4/perl/Makefile.dist.mk  view on Meta::CPAN

	perl -pi -e "s/-DD_USE_LIB//g"                                          ../perl_dist/Makefile.PL
	rm ../perl_dist/C-sparse-$(PERL_VERSION).tar.gz
	cd ../perl_dist; perl Makefile.PL; make dist
	cp ../perl_dist/C-sparse-$(PERL_VERSION).tar.gz .

upload: dist
	if [ -f ../../cpan-upload-do ]; then \
               ../../cpan-upload-do -verbose C-sparse-$(PERL_VERSION).tar.gz; \
        fi

 view all matches for this distribution


C3000

 view release on metacpan or  search on metacpan

inc/Devel/CheckOS.pm  view on Meta::CPAN

have access to most of them and have had to work from information
gleaned from L<perlport> and a few other places.  For a complete list of
OS families, see L<Devel::CheckOS::Families>.

If you want to add your own OSes or families, see L<Devel::AssertOS::Extending>
and please feel free to upload the results to the CPAN.

=head1 BUGS and FEEDBACK

I welcome feedback about my code, including constructive criticism.
Bug reports should be made using L<http://rt.cpan.org/> or by email.

 view all matches for this distribution


CAD-Firemen

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

; Extand POD documentation with standard parts like licensing, copyright, ...
[PodWeaver]
; keep version number up to date
[PkgVersion]
;[PodVersion] (PodWeaver already inserts a version
; ask for confirmation before upload release
; we do not need it right now, because we included FakeRelease
;[ConfirmRelease]
; generate an INSTALL file
[InstallGuide]

 view all matches for this distribution


CAM-App

 view release on metacpan or  search on metacpan

lib/CAM/App.pm  view on Meta::CPAN

   {
      $cfg->{myURL} = CGI->url();
   }
   if (!exists $cfg->{fullURL} && $self->getCGI())
   {
      # For file uploads, the self_url call generates a
      #    "Use of uninitialized value at (eval 29) line 8."
      # error because of a bug in CGI v2.46.
      # Block this by turning off warnings for this line.
      no warnings;
      $cfg->{fullURL} = $self->getCGI()->self_url();

 view all matches for this distribution


CAM-PDF

 view release on metacpan or  search on metacpan

t/pdf.t  view on Meta::CPAN

      filename => 't/PDFReference15_v5.pdf',
      linear => 1,
      pages => [ map { +{ } } 1..1172 ],  # I don't know how many images per page
   },
   {
      # This one has Type 2 encryption, but I don't own it so I can't include it in the CPAN upload
      filename => 't/Sample5500.pdf',
      linear => 0,
      pages => [ map { +{ } } 1..3 ],  # no images
      permissions => [1,0,0,1], # no modify, no copy
   },

 view all matches for this distribution


CAM-PDFTaxforms

 view release on metacpan or  search on metacpan

t/pdf.t  view on Meta::CPAN

      filename => 't/PDFReference15_v5.pdf',
      linear => 1,
      pages => [ map { +{ } } 1..1172 ],  # I don't know how many images per page
   },
   {
      # This one has Type 2 encryption, but I don't own it so I can't include it in the CPAN upload
      filename => 't/Sample5500.pdf',
      linear => 0,
      pages => [ map { +{ } } 1..3 ],  # no images
      permissions => [1,0,0,1], # no modify, no copy
   },

 view all matches for this distribution


CAPE-Utils

 view release on metacpan or  search on metacpan

src_bin/suricata_extract_submit  view on Meta::CPAN


		# only add it if it is not white listed
		if ($add_it) {
			log_something( 'info', 'Name: ' . $name );

			# skip uploading it if it is zero sized
			if ( $data_size > 0 ) {

				# don't need to copy it if it is zero sized
				copy( $data_file, $name )
					or die 'Copy failed(' . $data_file . ' -> ' . $tempdir . '/' . $name . '): ' . $!;

src_bin/suricata_extract_submit  view on Meta::CPAN

						die($error);
					}
				} ## end else [ if ($sub_error) ]
			} else {
				$new_stats->{zero_sized}++;
				log_something( 'info', 'Not uploading as the sample is zero sized' );
			}
		} ## end if ($add_it)

		# rename the JSON file so we don't process it again
		move( $file, $file . '-processed' ) or die 'Appending "-processed" to the name of the JSON file...' . $!;

 view all matches for this distribution


CDS

 view release on metacpan or  search on metacpan

lib/CDS.pm  view on Meta::CPAN

	}

	$o->{ui}->line($countAccounts, ' accounts traversed');
	$o->{ui}->space;

	# Mark all objects that are younger than 1 day (so that objects being uploaded right now but not linked yet remain)
	$o->{ui}->title('Objects');
	$o->startProgress('objects');

	my %objects;
	my @topFolders = sort grep {$_ !~ /^\./} CDS->listFolder($o->{objectsFolder});

lib/CDS.pm  view on Meta::CPAN

	my $folderStore = $o->existingFolderStoreOrShowError // return;
	my $publicKey = $o->publicKey // return;

	# Upload the public key onto the store
	my $error = $folderStore->put($publicKey->hash, $publicKey->object);
	return $o->{ui}->error('Unable to upload the public key: ', $error) if $error;

	# Create the account folder
	my $folder = $folderStore->folder.'/accounts/'.$publicKey->hash->hex;
	my $permissions = $folderStore->permissions;
	$permissions->mkdir($folder, $permissions->accountFolderMode);

lib/CDS.pm  view on Meta::CPAN

	my $cmd = shift;

	my $ui = $o->{ui};
	$ui->space;
	$ui->command('cds put FILE* [onto STORE*]');
	$ui->p('Uploads object files onto object stores. If no stores are provided, the selected store is used. If an upload fails, the program immediately quits with exit code 1.');
	$ui->space;
	$ui->command('cds put FILE encrypted with AESKEY [onto STORE*]');
	$ui->p('Encrypts the object before the upload.');
	$ui->space;
	$ui->command('cds put object with [HASH* and] FILE …');
	$ui->p('Creates an object with the HASHes as hash list and FILE as data.');
	$ui->space;
	$ui->command('cds put public key of KEYPAIR …');

lib/CDS.pm  view on Meta::CPAN

	# Upload the object
	my $successfulStore;
	for my $store (@{$o->{stores}}) {
		my $error = $store->put($hash, $object, $keyPair);
		next if $error;
		$o->{ui}->pGreen('The object was uploaded onto ', $store->url, '.');
		$successfulStore = $store;
	}

	# Show the corresponding download line
	return if ! $successfulStore;

 view all matches for this distribution


CGI-Apache2-Wrapper

 view release on metacpan or  search on metacpan

lib/CGI/Apache2/Wrapper.pm  view on Meta::CPAN

  my %cookies = Apache2::Cookie->fetch($self->r);
  $self->{'.cookies'} = %cookies ? \%cookies : undef;
  return $self->{'.cookies'};
}

sub uploads {
  my ($self, $name) = @_;
  my $tmpfhs = $self->{'.tmpfhs'}->{$name};
  return $tmpfhs if (defined $tmpfhs and ref($tmpfhs) eq 'ARRAY');
  my @u = $self->req->upload($name);
  return unless @u;
  my $uploads = {};
  foreach my $u (@u) {
    next unless defined $u;
    my $tempname = $u->tempname();
    open(my $fh, '<', $tempname) or next;
    my $info = { %{$u->info()},
		 name => $name,
		 filename => $u->filename(),
		 size => $u->size(),
		 type => $u->type(),
	       };
    $uploads->{"$fh"} = {filehandle => $fh,
			 tempname => $tempname,
			 info => $info,
			};
    push @$tmpfhs, $fh;
  }
  $self->{'.uploads'} = $uploads;
  $self->{'.tmpfhs'}->{$name} = $tmpfhs;
  return $tmpfhs;
}

# Apache2::Request

lib/CGI/Apache2/Wrapper.pm  view on Meta::CPAN

  return $cookie;
}

# Apache2::Upload

sub upload {
  my ($self, $name) = @_;
  return unless $name;
  my $tmpfhs = $self->uploads($name);
  return unless (defined $tmpfhs and ref($tmpfhs) eq 'ARRAY');
  return wantarray ? @$tmpfhs : $tmpfhs->[0];
}

sub tmpFileName {
  my ($self, $fh) = @_;
  return unless (defined $fh and ref($fh) eq 'GLOB');
  my $uploads = $self->{'.uploads'};
  return unless (defined $uploads and ref($uploads) eq 'HASH');
  return (defined $uploads->{"$fh"} and 
	  defined $uploads->{"$fh"}->{tempname} ) ?
	    $uploads->{"$fh"}->{tempname} : undef;
}

sub uploadInfo {
  my ($self, $fh) = @_;
  return unless (defined $fh and ref($fh) eq 'GLOB');
  my $uploads = $self->{'.uploads'};
  return unless (defined $uploads and ref($uploads) eq 'HASH');
  return (defined $uploads->{"$fh"} and 
	  defined $uploads->{"$fh"}->{info} ) ?
	    $uploads->{"$fh"}->{info} : undef;
}

1;

__END__

lib/CGI/Apache2/Wrapper.pm  view on Meta::CPAN

See also L<CGI::Apache2::Wrapper::Cookie> for a
L<CGI::Cookie>-compatible interface to cookies.

=head2 Apache2::Upload

Uploads can be handled with the I<upload> method:

   my $fh = $cgi->upload('filename');

which returns a file handle that can be used to access the
uploaded file. If there are multiple upload fields, calling
I<upload> in a list context:

  my @fhs = $cgi->upload('filename');

will return an array of filehandles. There are two
helper methods available for uploads:

=over

=item * my $tmpfile = $cgi-E<gt>tmpFileName($fh);

This returns the name of the temporary file associated with
the I<$fh> fielhandle returned from I<upload>.

=item * my $info = $cgi-E<gt>uploadInfo($fh);

This returns a hash reference containing some information about
the uploaded file associated with the I<$fh> filehandle
returned from I<upload>. The keys of this hash typically include:

=over

=item * Content-Type

The content type, such as I<text/plain>, associated with this upload.

=item * Content-Disposition

This typically is a string such as
I<form-data; name="HTTPUPLOAD"; filename="data.txt">.

=item * size

This is the size of the uploaded file.

=item * name

This is the name of the HTML form element which generated the upload.

=item * filename

The (client-side) filename as submitted in the HTML form.
Note that some agents will submit the file's full pathname,
while others may submit just the basename.

=item * type

This is the MIME type of the upload.

=back

=back

 view all matches for this distribution


CGI-AppBuilder-Common

 view release on metacpan or  search on metacpan

Common.pm  view on Meta::CPAN

    my ($usr_sid,$usr_uid,$usr_tmo) = split /:/, $ar->{guid}; 
    $ar->{user_sid} = $usr_sid 	if $usr_sid =~ /^\d+$/;
    $ar->{user_uid} = $usr_uid	if $usr_uid;
    $ar->{user_tmo} = $usr_tmo	if $usr_tmo; 
  }
  $ar->{encoding} = 'multipart/form-data' if ($tsk && $tsk =~ /^upload_file/i);

  if (!exists $amg->{$tsk}) {
    $s->echo_msg("ERR: ($prg) could not find new task - $tsk.",0); 
    return; 
  }

 view all matches for this distribution


CGI-AppBuilder-MapDisp2

 view release on metacpan or  search on metacpan

MapDisp2.pm  view on Meta::CPAN


our $VERSION = 0.12;
require Exporter;
our @ISA         = qw(Exporter CGI::AppBuilder);
our @EXPORT      = qw();
our @EXPORT_OK   = qw(upload_sas_script 
                      get_scrnames
                      backup_file mk_dir
                   );
our %EXPORT_TAGS = (
    sas_scr => [qw(upload_sas_script)],
    all   => [@EXPORT_OK]
);

=head1 NAME

MapDisp2.pm  view on Meta::CPAN

sub new {
  my ($s, %args) = @_;
  return $s->SUPER::new(%args);
}

=head2 upload_sas_script($q,$ar)

Input variables:

  $q	- CGI class
  $ar	- array ref containing the following variables:

MapDisp2.pm  view on Meta::CPAN


Return: None

=cut

sub upload_sas_script {
  my ($s, $q, $ar) = @_;

  my @c0 = caller(0);	my @c1 = caller(1);
  my $cls = (exists $c1[3]) ? $c1[3] : ''; 
  my $prg = "$cls [$c0[2]] -> $c0[3]"; 

MapDisp2.pm  view on Meta::CPAN

  if (! $svr) {
    $s->echo_msg("ERR: ($prg) sever name has not been defined.",0);
    return; 
  }
  if (! $sfn) {
    $s->echo_msg("ERR: ($prg) no upload file is specified.",0);
    return; 
  }
  my $adr = eval $s->set_param('all_dir', $ar);

  my $sdr = (exists $adr->{$svr}{sas}) ? $adr->{$svr}{sas} : '';

MapDisp2.pm  view on Meta::CPAN

  if (! $apu) {
    $s->echo_msg("ERR: ($prg) no application user name is specified/available.",0);
    return; 
  }
  my $udr = join $ds, $sdr, $apu;
  $ar->{upload_dir} = $udr; 

  $s->mk_dir($sdr); 
  $s->mk_dir($udr);   

  $s->upload_file($q, $ar); 
  
  $s->echo_msg("INFO: ($prg) File - $sfn is uploaded to $sdr.", 1);

  return;
} 


 view all matches for this distribution


CGI-AppBuilder-MapDisps

 view release on metacpan or  search on metacpan

MapDisps.pm  view on Meta::CPAN

  my $u4ih = "$url&a=help&task=run_droptable"; 
  my $u4j  = "$url&task=disp_new&new_task=run_rentable";
     $u4j .= "&study_id=$ar->{study_id}"	if $f_sid;   
  my $u4jh = "$url&a=help&task=run_rentable"; 

  my $u4k1  = "$url&task=disp_new&new_task=upload_sas_script";
     $u4k1 .= "&study_id=$ar->{study_id}"	if $f_sid; 
     $u4k1 .= "&list_id=$ar->{list_id}"		if $f_lid; 

  my $u4k  = "$url&task=disp_new&new_task=add_ldrsasjob";
     $u4k .= "&study_id=$ar->{study_id}"	if $f_sid; 

MapDisps.pm  view on Meta::CPAN

  # 5 - Load XLS 
  my $t5t  = "5. Load: "; 
  my $u5a  = "$url&task=sel_spec";		# web URL
  my $u5b  = "$url&task=disp_new&new_task=run_ldspecs";
  my $u5bh = "$url&a=help&task=run_ldspecs"; 
  my $u5c  = "$url&task=disp_new&new_task=upload_file";
  my $u5ch = "$url&a=help&task=upload_file"; 
  my $u5d  = "$url&task=disp_new&new_task=sel_spec";
  my $u5e  = "$url&task=disp_new&new_task=run_ldviews";
  my $u5eh = "$url&a=help&task=run_ldviews";   
  my $u5f  = "$url&task=disp_new&new_task=sel_codes";
  my $u5g  = "$url&task=disp_logfiles";    

 view all matches for this distribution


CGI-Application-Framework

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

     DBD::SQLite (1.09) so that 'make test' doesn't fail for people
     with older versions; thanks to Dan Horne for finding this stuff

0.20_8 Sep 7, 2005
   - version number update, attributions, license & copyright info, etc.
     in prep of an upload to PAUSE

0.20_7 Jul 11, 2005
   - login validation errors weren't being passed to login template
   - checksum_okay wasn't picking up the checksum from URL for POSTed forms

 view all matches for this distribution


CGI-Application-Plugin-AJAXUpload

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN

use Perl6::Slurp;
use Readonly;
use Data::FormValidator;

@EXPORT = qw(
    ajax_upload_httpdocs
    ajax_upload_setup
    ajax_upload_default_profile
    _ajax_upload_rm
    _ajax_upload_compile_messages
);

use version; our $VERSION = qv('0.0.3');

# Module implementation here

Readonly my $FIELD_NAME => 'file';
Readonly my $MAX_UPLOAD => 512*1024;

sub ajax_upload_httpdocs {
    my $self = shift;
    my $httpdocs = shift;
    if ($httpdocs) {
        $self->{__CAP__AJAXUPLOAD_HTTPDOCS} = $httpdocs;
        return;
    }
    return $self->{__CAP__AJAXUPLOAD_HTTPDOCS};
}

sub ajax_upload_setup {
    my $self = shift;
    my %args = @_;

    my $upload_subdir = $args{upload_subdir} || '/img/uploads';
    my $dfv_profile = $args{dfv_profile};
    if (!$dfv_profile) {
        $dfv_profile = $self->ajax_upload_default_profile();
    }
    my $run_mode = $args{run_mode} || 'ajax_upload_rm';

    $self->run_modes(
        $run_mode => sub {
            my $c = shift;
            $c->header_props(
                -type=>'text/javascript',
                -encoding=>'utf-8',
                -charset=>'utf-8'
            );
            my $r = eval {
                $c->_ajax_upload_rm($upload_subdir, $dfv_profile);
            };
            if ($@) {
                carp $@;
                return $c->to_json({status=> 'Internal Error'});
            }

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN

    );

    return;
}

sub _ajax_upload_rm {
    use autodie qw(open close);
    my $self = shift;
    my $upload_subdir = shift;
    my $dfv_profile = shift;
    my $httpdocs_dir = $self->ajax_upload_httpdocs;  

    return $self->to_json({status => 'No document root specified'})
        if not defined $httpdocs_dir;

    my $full_upload_dir = "$httpdocs_dir/$upload_subdir";
    my $query = $self->query;

    my $lightweight_fh  = $query->upload('file');
    return $self->to_json({status=>'No file handle obtained'})
        if !defined $lightweight_fh;
        
    my $fh = $lightweight_fh->handle;
    return $self->to_json({status => 'No file handle promoted'})
        if not $fh;

    my $value = slurp $fh;
    close $fh;
    my $filename = $query->param('file');
    my $info = $query->uploadInfo($filename);
    return $self->to_json({status => 'No file name obtained'})
        if not $filename;
    $filename = "$filename"; # force $filename to be a strict string

    my $mime_type = 'text/plain';

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN

        file_name => $filename,
        mime_type   => $mime_type,
        data_size => length $value,
    };
    my $results = Data::FormValidator->check($data, $dfv_profile);
    return $self->_ajax_upload_compile_messages($results->msgs)
        if ! $results->success;

    $value = $results->valid('value');
    $filename = $results->valid('file_name');

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN


        return $self->to_json({status => 'Document root is not a directory'})
            if not -d $httpdocs_dir;

        return $self->to_json({status => 'Upload folder is not a directory'})
            if not -d $full_upload_dir;

        return $self->to_json({status => 'Upload folder is not writeable'})
            if not -w $full_upload_dir;
        
        return $self->to_json({status => 'No data uploaded'})
            if not $value;

    }

    open $fh, '>', "$full_upload_dir/$filename";
    print {$fh} $value;
    close $fh;

    return $self->to_json({
        status=>'UPLOADED',
        image_url=>"$upload_subdir/$filename"
    });
}

sub _ajax_upload_compile_messages {
    my $self = shift;
    my $msgs = shift;
    my $text = '';
    foreach my $key (keys  %$msgs) {
        $text .= "$key: $msgs->{$key}, ";
    }
    return $self->to_json({status=>$text});
}

sub ajax_upload_default_profile {
    return {
        required=>[qw(value file_name mime_type data_size)],
        untaint_all_constraints=>1,
        constraint_methods => {
            value=>qr{\A.+\z}xms,

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN

1; # Magic true value required at end of module
__END__

=head1 NAME

CGI::Application::Plugin::AJAXUpload - Run mode to handle a file upload and return a JSON response

=head1 VERSION

This document describes CGI::Application::Plugin::AJAXUpload version 0.0.3

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN

    use CGI::Application::Plugin::JSON qw(to_json);
    use CGI::Application::Plugin::AJAXUpload;

    sub setup {
        my $c = shift;
        $c->ajax_upload_httpdocs('/var/www/vhosts/mywebapp/httpdocs');

        $c->ajax_upload_setup(
            run_mode=>'file_upload',
            upload_subdir=>'/img/uploads',
        );
        return;
    }

=head1 DESCRIPTION

This module provides a customisable run mode that handles a file upload
and responds with a JSON message like the following:

    {status: 'UPLOADED', image_url: '/img/uploads/666.png'}

or on failure

    {status: 'The image was too big.'}

This is specifically intended to provide a L<CGI::Application> based back
end for L<AllMyBrain.com|http://allmybrain.com>'s 
L<image upload extension|http://allmybrain.com/2007/10/16/an-image-upload-extension-for-yui-rich-text-editor> to the
L<YUI rich text editor|http://developer.yahoo.com/yui/editor>. However as far as
I can see it could be used as a back end for any L<CGI::Application> website that uploads files behind the scenes using AJAX. In any case this module does NOT
provide any of that client side code and you must also map the run mode onto the URL used by client-side code.
That said a working example is provided which could form the basis of
a rich text editor.  

=head1 INTERFACE 

=head2 ajax_upload_httpdocs

The module needs to know the document root because it will need to
to copy the file to a sub-directory of the document root,
and it will need to pass that sub-directory back to the client as part
of the URL. If passed a value it will store that as the document root.
If not passed a value it will return the document root.

=head2 ajax_upload_setup

This method sets up a run mode to handle a file upload
and return a JSON message providing status. It takes a number of named
parameters:

=over

=item upload_subdir

This is the sub-directory of I<httpdocs_dir> where the files will actually
be written to. It must be writeable. It defaults to '/img/uploads'.

=item dfv_profile

This is a L<Data::FormValidator> profile. The hash array that is validated
consists of the fields described below. A very basic profile is provided by
default.

=over 4

=item I<value> This is contains the actual data contained in the upload. It will
be untainted. One can of course apply filters that resize the image (assuming
it is an image) or scrub the HTML (if that is appropriate). 

=item I<file_name> This is the filename given by the browser. By default it will
be required to be no more than 30 alphanumeric, hyphen or full stop,

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN


=item I<data_size> By default this is required to be less than 512K. 

=back 

Note that this module's handling of file upload and data validation is
somewhat different from that expected by
L<Data::FormValidator::Constraints::Upload> and 
L<Data::FormValidator::Filters::Image>. Those modules work with file handles.
The L<Data::FormValidator> profiles required  by this module are expected
to work with the data and meta data.

=item run_mode

This is the name of the run mode that will handle this upload. It defaults to
I<ajax_upload_rm>.

=back

=head2 ajax_upload_default_profile

This returns a hash reference to the default L<Data::FormValidator>
profile. It can be called as a class method.

=head2 _ajax_upload_rm

This private method forms the implementation of the run mode. It requires a
I<file> CGI query parameter that provides the file data. Optionally it also
takes a I<validate> parameter that will make other more paranoid checks.
These checks are only optional because if the system is set up correctly

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN


=over 

=item --

It will get the filename and data associated with the upload and 
pass the data through the L<Data::FormValidator> if a profile is 
supplied.

=item --

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN


=item --

The data will then be copied to the given file, its path being the 
combination of the I<httpdocs_dir> parameter, the
I<upload_subdir> and the generated file name.

=item - 

The successful JSON message will be passed back to the client.

lib/CGI/Application/Plugin/AJAXUpload.pm  view on Meta::CPAN

could just define your own.

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to
C<bug-cgi-application-plugin-ajaxupload@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.

One really odd thing is that the content header of the AJAX reply cannot
be 'application/json' as one would expect. This module sets it to
'text/javascript' which works. There is a very short discussion on the

 view all matches for this distribution


CGI-Application-Plugin-Apache

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/Apache.pm  view on Meta::CPAN

do the right thing by simply doing nothing :)

=head2 CGI::Application::Plugin::Apache::Request

Sometimes the default compatability is not enough. For instance, if you are using
plugins that use the cookies or upload features of L<CGI.pm|CGI> then you might
need some extra help.

This is what L<CGI::Application::Plugin::Apache::Request> is for. You can make this
your C<query> object by setting the C<CAPA_CGI_Compat> var to C<On> in your Apache
config file:

 view all matches for this distribution


CGI-Application-Plugin-Authentication-Driver-DBIC

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for CGI-Application-Plugin-Authentication-Driver-DBIC

0.01    Tue Apr 25 10:20:21 EDT 2007
        First upload to CPAN.

0.02    Tue May 29 23:26:07 EDT 2007
        Added a 'use lib' to tests so that the test modules could be 
        properly found.  Thanks Joenio Marques da Costa <joenio@gmail.com>
        (Closes rt.cpan.org: #27318, #27319)

 view all matches for this distribution


CGI-Application-Plugin-Authentication

 view release on metacpan or  search on metacpan

local/lib/perl5/Module/Build/Bundling.pod  view on Meta::CPAN

    license => 'perl',
  )->create_build_script;

Authors are strongly suggested to limit the bundling of additional
dependencies if at all possible and to carefully test their distribution
tarballs on older versions of Perl before uploading to CPAN.

=head1 AUTHOR

David Golden <dagolden@cpan.org>

 view all matches for this distribution


CGI-Application-Plugin-Cache-File

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.01  Tue Jul 21 07:29:18 2009
	- original version; created by h2xs 1.23 with options
		-AXc -n CGI::Application::Plugin::Cache::File

0.2     2009-07-21
        Forced increment to re-upload

0.3     2009-07-21
        Fixed mistakes in POD

0.4     2009-07-22

 view all matches for this distribution


CGI-Application-Plugin-HTCompiled

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - test for CGI::Application v. 4.31
    - renamed TestApp2 to CGIAPP_TestApp2 to avoid unauthorized release warning
    - require ExtUtils::Install >= 1.52 to properly install with makefile

1.03 Tue Oct 13 20:25:50 2009
    - No code changes. I just didn't upload the last version the right way.

1.02 Tue Oct 13 16:54:32 2009
    - Changed the way the plugin gets used from inheritance to ordinary "use".
    - Changed some tests.

 view all matches for this distribution


CGI-Application-Plugin-Nes

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/Nes.pm  view on Meta::CPAN

For compatibility with CGI.pm:

  $ENV{CGI_APP_NES_BY_CGI} = 1;

It's a bit slower than letting to Nes handle the query. 
Not support for upload.

=head1 Compare

See L<http://cgi-app.org/index.cgi?LoginLogoutExampleApp>

 view all matches for this distribution


CGI-Application-Plugin-ValidateQuery

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/ValidateQuery.pm  view on Meta::CPAN

=head2 FUTURE

This concept could be extended to all check values set through
C<< $ENV{PATH_INFO} >>.

This plugin does not handle file upload validations, and won't in the
future.

Providing untainting is not a goal of this module, but if it's easy and
if someone else provides a patch, perhaps support will be added. L<Params::Validate>
provides untainting functionality and may be useful.

 view all matches for this distribution


CGI-Auth

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

2.3	Sat Aug 31, 2002
	Added support for HTML::Template templates
	Fixed a few bugs.

2.2	Mon Aug 19, 2002
	Converted to h2xs in preparation for uploading to CPAN.

 view all matches for this distribution


CGI-AutoForm

 view release on metacpan or  search on metacpan

lib/CGI/AutoForm.pm  view on Meta::CPAN

    {
        return ($field->{html} = $self->radio_html($field));
    }
    elsif ($type eq 'FILE')
    {
        return ($field->{html} = $self->fileupload_html($field));
    }
    else
    {
        die("Field type [$type] not recognized for $field->{FIELD_NAME}");
        return undef;
    }
}

# File type input.
##at not sure if the comments below are correct?
## In order for file uploads to work on a form,
## the enctype="file" attribute needs to be added to the form tag.
sub fileupload_html
{
    my ($self,$field) = @_;

    my $need_req = $field->{REQUIRED} eq 'Y';
    my $need_req_class = 0;

 view all matches for this distribution


CGI-Bus

 view release on metacpan or  search on metacpan

lib/CGI/Bus/lngbase/CGI_Bus_wg.pm  view on Meta::CPAN

 ,'ddlbsetvalue'=>['<',     'set value']
 ,'Files'       =>['Files', 'Files attached']
 ,'+|-'         =>['+/-',   'Add / Close / Delete']
 ,'fsopens'	=>['...',   'Files opened']
 ,'fsclose'	=>['Close', 'Close files choosen']
 ,'fsbrowse'	=>['Browse','Choose file to upload']
 ,'fsdelmrk'	=>['DelMark','Mark to delete']
 )
}

 view all matches for this distribution


CGI-Capture

 view release on metacpan or  search on metacpan

lib/CGI/Capture.pm  view on Meta::CPAN

#pod =pod
#pod
#pod =head1 SYNOPSIS
#pod
#pod   # Capture the current CGI to a file, and replay it once created
#pod   use CGI::Capture 'fileupload.dat';
#pod   
#pod   # Create an object and capture the state
#pod   my $Capture = CGI::Capture->new->capture;
#pod   
#pod   # Store it in a file and load it back in

lib/CGI/Capture.pm  view on Meta::CPAN

#pod L<CGI> does a terribly bad job of saving CGI calls. C<CGI::Capture> tries
#pod to resolve this and save a CGI call in as much painstaking detail as it
#pod possibly can.
#pod
#pod Because of this, C<CGI::Capture> should work with server logins, cookies,
#pod file uploads, strange execution environments, special environment
#pod variables, the works.
#pod
#pod It does this by capturing a large amount of the perl environment
#pod BEFORE F<CGI.pm> itself gets a chance to look at it, and then restores
#pod it in the same way.

lib/CGI/Capture.pm  view on Meta::CPAN

#pod
#pod Once you have stored the CGI capture as a YAML file, you can hand-edit the
#pod capture file, removing any keys you will not want to be restored, keeping
#pod only the useful parts.
#pod
#pod For example, to create a test file upload or CGI request involving
#pod cookies, you could discard everything except for the STDIN section of
#pod the capture file, which will then allow you to reuse the capture on
#pod other hosts, operating systems, and so on.
#pod
#pod =head1 METHODS

lib/CGI/Capture.pm  view on Meta::CPAN

version 1.15

=head1 SYNOPSIS

  # Capture the current CGI to a file, and replay it once created
  use CGI::Capture 'fileupload.dat';
  
  # Create an object and capture the state
  my $Capture = CGI::Capture->new->capture;
  
  # Store it in a file and load it back in

lib/CGI/Capture.pm  view on Meta::CPAN

L<CGI> does a terribly bad job of saving CGI calls. C<CGI::Capture> tries
to resolve this and save a CGI call in as much painstaking detail as it
possibly can.

Because of this, C<CGI::Capture> should work with server logins, cookies,
file uploads, strange execution environments, special environment
variables, the works.

It does this by capturing a large amount of the perl environment
BEFORE F<CGI.pm> itself gets a chance to look at it, and then restores
it in the same way.

lib/CGI/Capture.pm  view on Meta::CPAN


Once you have stored the CGI capture as a YAML file, you can hand-edit the
capture file, removing any keys you will not want to be restored, keeping
only the useful parts.

For example, to create a test file upload or CGI request involving
cookies, you could discard everything except for the STDIN section of
the capture file, which will then allow you to reuse the capture on
other hosts, operating systems, and so on.

=head1 METHODS

 view all matches for this distribution


CGI-Carp-StackTrace

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for CGI::Carp::StackTrace

0.01 2013-02-11 15:55:35
    - initial upload

 view all matches for this distribution


CGI-ContactForm

 view release on metacpan or  search on metacpan

lib/CGI/ContactForm.pm  view on Meta::CPAN


    /www/username/cgi-bin/lib

=item *

Create the directory C</www/username/cgi-bin/lib/CGI>, and upload
C<ContactForm.pm> to that directory.

=item *

Create the directory C</www/username/cgi-bin/lib/CGI/ContactForm>, and
upload C<MHonArc.pm> to that directory.

=item *

In the CGI scripts that use this module, include a line that tells Perl
to look for modules also in your local library, such as

lib/CGI/ContactForm.pm  view on Meta::CPAN

and C<PLAIN>. You may need help from the mail server's administrator to
find out which protocol and username/password pair to use.

If there are multiple forms, a more convenient way to deal with a need
for authentication may be to make use of the C<Sender.config> file that
is included in the distribution. You just edit it and upload it to the
same directory as the one where C<Sender.pm> is located.

See the L<Mail::Sender|Mail::Sender> documentation for further guidance.

=head1 AUTHOR, COPYRIGHT AND LICENSE

 view all matches for this distribution


( run in 3.970 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )