Hi
I have just installed the new fileupload mod and I found that for record with ID 1 I was getting the images for 11, 12, 13 etc... This seems to fix it, where you want the image to print change this:
foreach $file (@files) {
if ($file =~ /^$file_test/) {to this:
foreach $file (@files) {
if ($file =~ /^$file_test\./) {Also if you want height and width's to be worked out the Image::Size Perl module from http://www.cpan.org/ is easy to use:
Add this to the top of the html.pl file:
And where you want the image to be printed:
print qq|<p><img src="$SAVE_DIRECTORY_URL/$file" alt="$rec{'Title'}" width="$x" height="$y" /></p>\n|;Chris
--
http://webarchitects.co.uk/
I have just installed the new fileupload mod and I found that for record with ID 1 I was getting the images for 11, 12, 13 etc... This seems to fix it, where you want the image to print change this:
Code:
$file_test = $rec{$db_key} . "."; foreach $file (@files) {
if ($file =~ /^$file_test/) {
Code:
$file_test = $rec{$db_key}; foreach $file (@files) {
if ($file =~ /^$file_test\./) {
Add this to the top of the html.pl file:
Code:
use Image::Size;Code:
my ($x, $y) = imgsize ("$SAVE_DIRECTORY/$file"); print qq|<p><img src="$SAVE_DIRECTORY_URL/$file" alt="$rec{'Title'}" width="$x" height="$y" /></p>\n|;
--
http://webarchitects.co.uk/