Please read the Perl Services Licensing Agreement
By downloading, purchasing, acquiring and/or implementing any PerlServices software, you agree to be bound by the terms and conditions of the distribution policy.
To Top
Quick Setup
This program can easily be set-up within a few minutes, to get file upload ability on your web site.
Set the path to Perl on the first line of the upload.cgi script. Upload it to your cgi-bin, CHMOD to 755 if on a Unix type server, then load the upload_demo.html form in your browser and test.
To Top
Allowing only certain types of files
This version of PSUpload allows you to specify certain file types that will be the only file
types permitted for upload. Look in the upload.cgi file, around line 97 and you will see
an array named "@types". This is where you specify the file types that you will
permit to be uploaded. Enter one extension per line, or enter the keyword "ALL" in uppercase and without quotes to accept all file types.
@types = qw~
txt
jpeg
jpg
gif
~;
To Top
Maximum size per file
On line 51 in the upload.cgi file, you will see a $max variable. If you want
to limit the files upload size, specify that size here, in Kilobytes. If you don't want to
limit the upload size, then set this variable to 100000000000 to allow for filesizes of up to 100 tetrabytes, which is about the size of all hard drives in your entire country.
Note that the file size calculation by the program is based on a real size of 1024 bytes
per Kilobyte.
To Top
Number of files per upload
The number of files that can be uploaded per form submission is controlled by your HTML document. To allow for extra file uploads, add extra file input form fields.
Each of your file input fields must be named FILEn where "n" is any unique number and "FILE" is un uppercase. To allow 3 file uploads in one process, you'd use the following in your form :
<input type="File" name="File1">
<input type="File" name="File2">
<input type="File" name="File3">
Each input field accepts only one file / file name. You cannot "select all files".
To Top
Handling same named files
A common problem encountered with upload scripts, be they Perl, CGI, PHP, ASP or other, is that someone will upload a file that already exists in the target directory on the server. The default behaviour for PSUpload V4.0 disallows file overwrites by automatically appending a sequential unique number to the new file. The file with the highest number is the most recently uploaded file. You can set it to overwrite existing files by editing the upload.cgi scrip on line 92 and setting the $overwrite variable to 1;
To Top
Incorporating in another program
The upload.cgi is not written to be incorporated in another program. It would require custom modifications to Perl script. We can make these mods and create a variable for you which contains a string in your preferred format for our minimum charge of USD $30.00
To Top
Note on NT servers
NT servers need to set the correct path to their mail program on line 79 in the variable named : $smtp_path. This should be set to your mail server which is usually mail.YOURDOMAINNAME.com or .net or whatever the case may be. You should also set the $notify variable to an email address that matches your domain. E.g.
$notify = 'you@google.com';
$smtp_path = "mail.google.com";
To Top