XUpload - New to XUpload PLEASE HELP!

Message
Author
JustDucky923
Posts: 2
Joined: Jan 22, 2008 7:02 pm

New to XUpload PLEASE HELP!

#1 Postby JustDucky923 » Jan 22, 2008 7:09 pm

I purchased XUpload Pro last week and had it installed by sibsoft. They did a GREAT job, despite some road blocks from my ISP. Now that it is functioning I have a few more questions and I hope someone here can help me.

1. How can I integrate this into an existing page? Can I simply cut and paste the entire code and place it where I want it into another page on the site?

2. How can I restrict the type of files that can be uploaded? I want only image files.

3. How can I change the page where you are redirected after the file has been uploaded? I just want to make a custom page that says – upload successful or something.

4. On the form there is a space for “description”; however when the file is uploaded I don’t see the “description” anywhere. How can I get that information also?

5. There is a field for “email”, could this be changed to MY email, instead of a field that they fill in. So that every time someone uploads a file I would get an email notification?

I am very new to this and I desperately need help getting this up and working. My operating system is XP home and I am creating the website with ecommercetemplates and FrontPage 2003.

Thank you!!

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Jan 23, 2008 7:29 am

1. Yes. You can copy entire code to another pages on your site. License limited to one domain only.

2. In XUploadConfig.pm specify allowed extensions:

Code: Select all

ext_allowed     => 'jpg|jpeg|gif|png|bmp',
3. In same config file specify redirect URL:

Code: Select all

url_post        => 'http://server.com/complete.html',
4. No description in emails? No way! Also info about uploaded files sending as POST request to 'url_post' URL. You can see post.cgi script can handle it. You can use any php instead of post.cgi to receive upload info and put it in database etc.

5. Your xupload is on Linux server? Fill all email settings in config in "Email confirmation" section, all upload confirmations sending to 'confirm_email' e-mail.

JustDucky923
Posts: 2
Joined: Jan 22, 2008 7:02 pm

#3 Postby JustDucky923 » Jan 23, 2008 6:49 pm

Well that seemed straightforward but when I made the changes you suggesed (only the ones in XUploadConfig.pm) nothing works. The form worked yesterday, now it shows only "1 file lmaximum" to be uploaded - I didn't change this! And when I browse, and try to upload a file nothing happens - to progress bar and nothing is uploaded. Here is the link to the page: http://evideohomesale.com/xupload/upload_form.html

And here is the XUploadConfig.pm:

package XUploadConfig;
use strict;
use Exporter ();
@XUploadConfig::ISA = qw(Exporter);
@XUploadConfig::EXPORT = qw($c);
use vars qw( $c );

$c=
{
# Directory for temporary using files
temp_dir => '/home/kellynormand/evideohomesale.com/cgi-bin/xupload/temp', # Enter your temp dir path here

# 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 => '/home/kellynormand/evideohomesale.com/html/uploads', # enter your target dir here

# URL to send all input values from upload page
url_post => 'http://evideohomesale.com/xupload/thankyou.htm', # post URL should be here

# Max number of upload fields
max_upload_files => 4,

# Minimum/Maximum Total upload size in Kbytes (leave empty or zero to disable)
min_upload_size => 0,
max_upload_size => 7000000,

# Minimum/Maximum upload Filesize in Kbytes (leave empty or zero to disable)
min_upload_filesize => 0,
max_upload_filesize => 700000,

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
#ext_allowed => 'jpg|jpeg|gif|png|bmp',
ext_allowed => '',

# Not Allowed file extensions delimited with '|'
# Leave it blank to disable this filter
ext_not_allowed => '',
},
2 =>
{
# Directory for uploaded files
target_dir => '/var/www/cgi-bin/UPLOAD2/uploads2',

# URL to send all input values from upload page
url_post => 'http://www.yourserver.com/cgi-bin/UPLOAD2/post.cgi',

# Max number of upload fields
max_upload_files => 4,

# Minimum/Maximum Total upload size in Kbytes (leave empty or zero to disable)
min_upload_size => 0,
max_upload_size => 10000,

# Minimum/Maximum upload Filesize in Kbytes (leave empty or zero to disable)
min_upload_filesize => 10,
max_upload_filesize => 70000,

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|zip|mp3',

# Not Allowed file extensions delimited with '|'
# Leave it blank to disable this filter
ext_not_allowed => 'exe|msi|bat|com|inf',
},
},

# 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 => 'Rename',

# Use ajax mode instead of streaming
# Slow down progress refresh, but may help in some situations
ajax_mode => 1,

# 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 => 'logs.txt',

# Enable users to add descriptions to files
enable_file_descr => 1,

# 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(s) uploaded",

##### Custom error messages #####

msg => { upload_size_big => "Maximum total upload size exceeded<br>Please stop transfer right now.<br>Max total upload size is: ",
upload_size_small => "Minimum total upload size limit detected.<br>Please stop transfer right now.<br>Min total upload size is:",
file_size_big => "exceeded Max filesize limit! Skipped.",
file_size_small => "size is less than Min filesize limit! Skipped.",
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 filename! Skipped.",
bad_extension => "have unallowed extension! Skipped.",
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",
},
};

1;

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Jan 24, 2008 7:57 am

Cause upload.cgi gives error:

Code: Select all

http://evideohomesale.com//cgi-bin/xupload/upload.cgi?mode=settings
chmode changed or windows linebreaks added when saving upload.cgi probably[/code]