Gossamer Forum
Home : Products : DBMan : Customization :

Graphic Upload trouble

Quote Reply
Graphic Upload trouble
I'm having some trouble with the graphic upload mod and keep getting an error message.
I would greatly appreciate it if someone could take the time to look at my config:


I am fairly new at cgi but I think I may have done something wrong in the sub html_default_mod_form part of html.pl


Quote Reply
Re: Graphic Upload trouble In reply to
The portion you've mentioned is the only area I've taken a look at however, you'll need to doublecheck other areas you've modded to make sure you get the same changes. You need to close off the previous print statement and there is a misplaced closing print statement.

|;<<< add this closing print tag
if (-e "$SAVE_DIRECTORY/$rec{$db_key}") {
opendir (GRAPHIC, "$SAVE_DIRECTORY/$rec{$db_key}") or &cgierr("unable to open directory: $SAVE_DIRECTORY/$rec{$db_key}. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}/$file">|;
|;<<<remove this closing print tag
if ($form_upload_add) {

Check for the same error in other areas and you should be all set. Good luck!