http://dirauxam.org/upload_form.html
ext_allowed is undefined
Help
v/r,
Chuck
XUpload - Windows SBS 2003 and XUpload pro
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
That's strange, but I can't open http://dirauxam.org/cgi-bin/upload.cgi?mode=settings
check your config or something. Should give settings string.
check your config or something. Should give settings string.
Windows SBS 2003 and XUpload pro
Had to add a slash in the xupload.js for:
src="/btn-close.gif"
and
src="/blank.html"
==============
//--Initialization------
var form_action;
form_action = getFormAction(document.F1Upload);
document.write('<script src="' + form_action +'&mode=settings' + '&xmode=' +document.F1Upload.xmode.value+ '" type="text/javascript"><\/script>');
document.write('<div id="overlay"></div><div id="lightbox"><div id="lhdr">Upload in progress...<img id="close" src="/btn-close.gif" onclick="if(window.transfer.StopUpload)window.transfer.StopUpload();" title="Close this window" /></div><iframe src="/blank.html" name="transfer" border=0 SCROLLING=NO topmargin=0 leftmargin=0 frameborder=0 style="width: 390px; height: 320px;"></iframe></div>');
document.write('<div id="progress2" style="position: absolute; left: -999px;"><iframe src="/blank.html" id="progress2f" name="transfer2" border=0 SCROLLING=NO topmargin=0 leftmargin=0 frameborder=0 style="width: 395px; height: 260px;"></iframe></div>');
=========================
Here is the Config:
package XUploadConfig;
use strict;
chdir('d:\dirauxam\cgi-bin');
use Exporter ();
@XUploadConfig::ISA = qw(Exporter);
@XUploadConfig::EXPORT = qw($c);
use vars qw( $c );
$c=
{
# Directory for temporary using files
temp_dir => 'D:\DIRAUXAM\temp',
# You can use different upload modes for different upload forms
# Specify upload mode in xmode hidden input in upload_form.html
modes =>
{
1 =>
{
# Directory for uploaded files
target_dir => 'D:\DIRAUXAM\UldPho',
# URL to send all input values from upload page
url_post => 'http://dirauxam.org/cgi-bin/post.cgi',
# Max number of upload fields
max_upload_files => 4,
# Minimum total upload size in Kbytes (leave empty or zero to disable)
min_upload_size => 0,
# Maximum total upload size in Kbytes
max_upload_size => 7000000,
# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|bmp',
},
2 =>
{
# Directory for uploaded files
target_dir => '/var/www/cgi-bin/xupload/uploads2',
# URL to send all input values from upload page
url_post => '',
# Max number of upload fields
max_upload_files => 2,
# Minimum total upload size in Kbytes
min_upload_size => 0,
# Maximum total upload size in Kbytes
max_upload_size => 50000000,
# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|rar|zip|mp3|avi|txt|csv|wma',
},
},
# Max length of uploaded filenames(without ext). Longer filenames will be cuted.
max_name_length => 64,
# Type of behavior when uploaded file already exist on disc. Available 3 modes: Rewrite/Rename/Warn
copy_mode => 'Rewrite',
# Use ajax mode instead of streaming
# Slow down progress refresh, but may help in some situations
ajax_mode => 0,
# Filename required mask (use standard perl regexp)
# Extension is not using here (e.g. will use 'song123' for 'song123.mp3')
# Leave empty if you don't need this custom filename validation
# Examples: '^\w+$' - alphanumeric only, '^photo' - starting with 'photo'
filaname_mask => '',
# Filename rename mask (use standard perl regexp)
# Removing all characters except these from the mask
# Extension is not using here (e.g. will use 'song123' for 'song123.mp3')
# Leave empty if you don't need this custom filename renaming
# Examples: 'a-zA-Z' - will keep letters only, '\w' - will keep alphanumeric only
filename_rename_mask => '',
# Allow relative folder path for uploading files from HTML form ext_folder field
# Pathes with '..' are not allowed
# 0=no,1=yes. [Security Warning!]
allow_ext_folder => 0,
# Password for upload (optional)
# Allow uploads only with correct password. Add '<input type="password" name="upload_password">' to your upload_form.html to use this feature.
# Leave empty to disable
upload_password => '',
# Email field required (optional)
# Force users to enter their email address. Upload notification to that email will be sent.
# Leave empty to disable, set to 1 to enable
email_required => '',
# Logfile name
uploads_log => 'log.txt',
# Enable users to add descriptions to files
enable_file_descr => 0,
# Uploaded files expiration time # days
# Leave blank or zero to disable
# WARNING: setting up this value could remove your old files older than X days
uploaded_files_lifetime => 0,
# Time to keep temp upload files on server, sec (24 hours = 86400 seconds)
temp_files_lifetime => 86400,
# IP restrictions
# Examples: '^(10\.0\.0\.182)$' - allow only 10.0.0.182, '^(10\.0\.1\.125|10\.0\.0\.\d+)$' - allow 10.0.1.125 & 10.0.0.* (*=number is wildcard)
# Use '^.*$' for no restrictions
ip_allowed => '^.*$',
##### Email confirmation #####
# Leave all fields blank OR comment them if you don't want to send confirmations
# Path to sendmail
sendmail_path => '/usr/sbin/sendmail',
# Email that confirmations will be sent to
confirm_email => '[email protected]',
# This email will be in "From:" field in confirmation emails
confirm_email_from => '[email protected]',
# Subject for email notification
email_subject => "Xupload: new file uploaded",
##### Custom error messages #####
msg => { filesize_exceeded => "Maximum upload size exceeded<br>Please stop transfer right now.<br>Max filesize is: ",
filesize_min_exceeded => "Minimum upload size limit detected.<br>Please stop transfer right now.<br>Min filesize is:",
no_temp_dir => "No temp dir exist! Please fix your temp_dir variable in config.",
no_target_dir => "No target dir exist! Please fix your target_dir variable in config.",
no_templates_dir => "No Templates dir exist! Please fix your templates_dir variable in config.",
transfer_complete => "Transfer complete!",
transfer_failed => "Upload failed!",
null_filesize => "have null filesize or wrong file path",
bad_filename => "is not acceptable!",
bad_extension => "have unallowed extension!",
too_many_files => "wasn't saved! Number of files limit exceeded.",
already_exist => "already exist!<br>Renaming to ",
saved_ok => "was saved successfully.",
wrong_password => "You've entered wrong password.<br>Authorization required.",
ip_not_allowed => "You are not allowed to upload files",
},
##########
# CSS names
styles => { 'hitech' => 'hitech.css',
'contrast'=> 'contrast.css',
'pro1' => 'pro1.css',
},
# Template names
templates => { 'simple' => 'simple.html',
'hitech' => 'hitech.html',
'pro1' => 'pro1.html',
'pro2' => 'pro2.html',
},
};
1;
src="/btn-close.gif"
and
src="/blank.html"
==============
//--Initialization------
var form_action;
form_action = getFormAction(document.F1Upload);
document.write('<script src="' + form_action +'&mode=settings' + '&xmode=' +document.F1Upload.xmode.value+ '" type="text/javascript"><\/script>');
document.write('<div id="overlay"></div><div id="lightbox"><div id="lhdr">Upload in progress...<img id="close" src="/btn-close.gif" onclick="if(window.transfer.StopUpload)window.transfer.StopUpload();" title="Close this window" /></div><iframe src="/blank.html" name="transfer" border=0 SCROLLING=NO topmargin=0 leftmargin=0 frameborder=0 style="width: 390px; height: 320px;"></iframe></div>');
document.write('<div id="progress2" style="position: absolute; left: -999px;"><iframe src="/blank.html" id="progress2f" name="transfer2" border=0 SCROLLING=NO topmargin=0 leftmargin=0 frameborder=0 style="width: 395px; height: 260px;"></iframe></div>');
=========================
Here is the Config:
package XUploadConfig;
use strict;
chdir('d:\dirauxam\cgi-bin');
use Exporter ();
@XUploadConfig::ISA = qw(Exporter);
@XUploadConfig::EXPORT = qw($c);
use vars qw( $c );
$c=
{
# Directory for temporary using files
temp_dir => 'D:\DIRAUXAM\temp',
# You can use different upload modes for different upload forms
# Specify upload mode in xmode hidden input in upload_form.html
modes =>
{
1 =>
{
# Directory for uploaded files
target_dir => 'D:\DIRAUXAM\UldPho',
# URL to send all input values from upload page
url_post => 'http://dirauxam.org/cgi-bin/post.cgi',
# Max number of upload fields
max_upload_files => 4,
# Minimum total upload size in Kbytes (leave empty or zero to disable)
min_upload_size => 0,
# Maximum total upload size in Kbytes
max_upload_size => 7000000,
# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|bmp',
},
2 =>
{
# Directory for uploaded files
target_dir => '/var/www/cgi-bin/xupload/uploads2',
# URL to send all input values from upload page
url_post => '',
# Max number of upload fields
max_upload_files => 2,
# Minimum total upload size in Kbytes
min_upload_size => 0,
# Maximum total upload size in Kbytes
max_upload_size => 50000000,
# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|rar|zip|mp3|avi|txt|csv|wma',
},
},
# Max length of uploaded filenames(without ext). Longer filenames will be cuted.
max_name_length => 64,
# Type of behavior when uploaded file already exist on disc. Available 3 modes: Rewrite/Rename/Warn
copy_mode => 'Rewrite',
# Use ajax mode instead of streaming
# Slow down progress refresh, but may help in some situations
ajax_mode => 0,
# Filename required mask (use standard perl regexp)
# Extension is not using here (e.g. will use 'song123' for 'song123.mp3')
# Leave empty if you don't need this custom filename validation
# Examples: '^\w+$' - alphanumeric only, '^photo' - starting with 'photo'
filaname_mask => '',
# Filename rename mask (use standard perl regexp)
# Removing all characters except these from the mask
# Extension is not using here (e.g. will use 'song123' for 'song123.mp3')
# Leave empty if you don't need this custom filename renaming
# Examples: 'a-zA-Z' - will keep letters only, '\w' - will keep alphanumeric only
filename_rename_mask => '',
# Allow relative folder path for uploading files from HTML form ext_folder field
# Pathes with '..' are not allowed
# 0=no,1=yes. [Security Warning!]
allow_ext_folder => 0,
# Password for upload (optional)
# Allow uploads only with correct password. Add '<input type="password" name="upload_password">' to your upload_form.html to use this feature.
# Leave empty to disable
upload_password => '',
# Email field required (optional)
# Force users to enter their email address. Upload notification to that email will be sent.
# Leave empty to disable, set to 1 to enable
email_required => '',
# Logfile name
uploads_log => 'log.txt',
# Enable users to add descriptions to files
enable_file_descr => 0,
# Uploaded files expiration time # days
# Leave blank or zero to disable
# WARNING: setting up this value could remove your old files older than X days
uploaded_files_lifetime => 0,
# Time to keep temp upload files on server, sec (24 hours = 86400 seconds)
temp_files_lifetime => 86400,
# IP restrictions
# Examples: '^(10\.0\.0\.182)$' - allow only 10.0.0.182, '^(10\.0\.1\.125|10\.0\.0\.\d+)$' - allow 10.0.1.125 & 10.0.0.* (*=number is wildcard)
# Use '^.*$' for no restrictions
ip_allowed => '^.*$',
##### Email confirmation #####
# Leave all fields blank OR comment them if you don't want to send confirmations
# Path to sendmail
sendmail_path => '/usr/sbin/sendmail',
# Email that confirmations will be sent to
confirm_email => '[email protected]',
# This email will be in "From:" field in confirmation emails
confirm_email_from => '[email protected]',
# Subject for email notification
email_subject => "Xupload: new file uploaded",
##### Custom error messages #####
msg => { filesize_exceeded => "Maximum upload size exceeded<br>Please stop transfer right now.<br>Max filesize is: ",
filesize_min_exceeded => "Minimum upload size limit detected.<br>Please stop transfer right now.<br>Min filesize is:",
no_temp_dir => "No temp dir exist! Please fix your temp_dir variable in config.",
no_target_dir => "No target dir exist! Please fix your target_dir variable in config.",
no_templates_dir => "No Templates dir exist! Please fix your templates_dir variable in config.",
transfer_complete => "Transfer complete!",
transfer_failed => "Upload failed!",
null_filesize => "have null filesize or wrong file path",
bad_filename => "is not acceptable!",
bad_extension => "have unallowed extension!",
too_many_files => "wasn't saved! Number of files limit exceeded.",
already_exist => "already exist!<br>Renaming to ",
saved_ok => "was saved successfully.",
wrong_password => "You've entered wrong password.<br>Authorization required.",
ip_not_allowed => "You are not allowed to upload files",
},
##########
# CSS names
styles => { 'hitech' => 'hitech.css',
'contrast'=> 'contrast.css',
'pro1' => 'pro1.css',
},
# Template names
templates => { 'simple' => 'simple.html',
'hitech' => 'hitech.html',
'pro1' => 'pro1.html',
'pro2' => 'pro2.html',
},
};
1;