Hi, I have limited Perl scripting background but I can understand scripts if I stare at them for a while. I have installed the demo dbman and have implemented the multi-upload mod changes. The script goes through the motion of adding the record but the link to the uploaded file is in the cgi-bin instead of the uploads directory that is defined by $SAVE_DIRECTORY. I don't know why it isn't saving the file there. I just want to be able to upload a file, any file (.doc, .xls, .pdf, .jpg, .psd, etc.) to the upload directory and be able to click on the link in the view records to open the file. What could I be doing wrong? I've gone through the instructions for JPDeni's multifile upload mod several times and can't seem to pinpoint the problem. Does anyone have any idea what I'm missing? Thanks.
Nov 18, 2004, 3:01 PM
New User (2 posts)
Nov 18, 2004, 3:01 PM
Post #2 of 3
Views: 2638
Okay, I've gotten it to a point where the directory/filenames are created by they are all 0 kb. What could be causing this? I've set up both the single file and multiple file uploads and both seem to create filenames but are all 0 kb size. Any suggestion is appreciated.
Mark
Mark
Nov 20, 2004, 12:11 AM
Veteran / Moderator (3034 posts)
Nov 20, 2004, 12:11 AM
Post #3 of 3
Views: 2625
There are some fixes you may need to make to the mod:
In sub validate_upload
change the following lines to include the quotes around the directory name:
if (!(-e "$SAVE_DIRECTORY/$newdirname")) {
and
opendir (GRAPHIC, "$SAVE_DIRECTORY/$newdirname") or &cgierr("Unable to open directory. Reason: $!");
To allow various file types you will need to ajust this line in your .cfg file:
$ALLOWED_EXT = '\.gif$|\.jpg$|\.doc$|\.pdf$|\.htm$|\.htm$l|\.GIF$|\.JPG$|\.DOC$|\.PDF$|\.HTML$|\.HTM$';
If that doesn't fix your problem, please visit the DBMan FAQ noted below in the section "Images" for any additional fixes or posted solutions for the mod.
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/
In sub validate_upload
change the following lines to include the quotes around the directory name:
if (!(-e "$SAVE_DIRECTORY/$newdirname")) {
and
opendir (GRAPHIC, "$SAVE_DIRECTORY/$newdirname") or &cgierr("Unable to open directory. Reason: $!");
To allow various file types you will need to ajust this line in your .cfg file:
$ALLOWED_EXT = '\.gif$|\.jpg$|\.doc$|\.pdf$|\.htm$|\.htm$l|\.GIF$|\.JPG$|\.DOC$|\.PDF$|\.HTML$|\.HTM$';
If that doesn't fix your problem, please visit the DBMan FAQ noted below in the section "Images" for any additional fixes or posted solutions for the mod.
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/