Hello,
I'm using the upload meter and it works great for me. My problem is that I want to change a few very basic things.
I have a cookie set for 'company' and another for 'oos_number'.
I have updated the uu_default_config.pm file so perl reads these cookies so they can be used in the path for where to store the file and for re-directing after the upload completes.
When I use the script with the following changes below, the progress meter doesn't show up.... it does however upload the file to the correct folder and it also re-directs to the correct place.
I have tried uploading any size of file from 19k to 110MB. The file uploads but the progress meter doesn't show.
If I remove my customizations and revert to the original, the progress bar shows again.
Please take a look at me uu_default_config.pm file below and see if you have any idea on what is wrong here.... I've spent hours on it.
Thanks
Marcel.
package uu_default_config;
use strict;
use Exporter;
#HERE ARE THE LINES I'VE ADDED
# Read Cookies set by PHP to determine file path
use CGI qw(:all); # I ADDED THIS LINE
my $da = new CGI;
my $company = $da->cookie('company');
my $oos_number = $da->cookie('oos_number');
@uu_default_config::ISA = qw( Exporter );
@uu_default_config::EXPORT = qw($config);
use vars qw($config);
$config = {
config_file_name => 'uu_default_config',
temp_dir => '/tmp/',
upload_dir => $ENV{'DOCUMENT_ROOT'} . '/uploads/' . $company . '/' . $oos_number . '/',
unique_upload_dir => 0,
unique_upload_dir_length => 16,
unique_file_name => 0,
unique_file_name_length => 16,
max_upload => 124857600,
overwrite_existing_files => 0,
redirect_after_upload => 1,
param_dir => '/tmp/',
pass_param_dir => 0,
redirect_url => '/review.php?oos_number=' . $oos_number,
redirect_using_js_html => 1,
redirect_using_html => 0,
redirect_using_js => 0,
redirect_using_location => 0,
get_data_speed => 1000,
disallow_extensions => '(sh|php|php3|php4|php5|py|shtml|phtml|cgi|pl|plx| htaccess|htpasswd)',
allow_extensions => '(jpg|jpeg|gif|bmp)',
normalize_file_names => 1,
normalize_file_delimiter => '_',
normalize_file_length => 48,
link_to_upload => 0,
path_to_upload => 'http://'. $ENV{'SERVER_NAME'} . '/uploads/' . $company . '/' . $oos_number . '/',
send_email_on_upload => 0,
html_email_support => 0,
link_to_upload_in_email => 0,
email_subject => 'Uber File Upload',
to_email_address => '[email protected],[email protected]',
from_email_address => '[email protected]',
log_uploads => 0,
log_params => 0,
log_dir => '/tmp/uu_logs/',
};
1;
Bookmarks