Gossamer Forum
Home : Products : DBMan : Customization :

Requiring a file upload...

Quote Reply
Requiring a file upload...
I'm having problems requiring a valid file upload BEFORE a record gets added to the DB. I have tried to add additional error codes to file-upload.cgi, but with no success. BTW I am using the validation routines that were worked on by Eliot and JPDeni, so I can manually delete any records which do not have an uploaded file, but I would really like to save that step if at all possible. Any pointers appreciated...

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Requiring a file upload... In reply to
What type of "error codes" have you added to the fileupload.cgi script?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Requiring a file upload... In reply to
Well, the most obvious one for starters was
Code:
unless (length($Filename) > 1) {$message = "No file was selected"; &cgierr; exit;}
I have also tried
Code:
if (length($in{'file-to-upload-01'}) < 1) {$message = "No file was selected"; &cgierr; exit;}
Neither works... I can't seem to figure this one out, so any help would be much appreciated...
------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)

[This message has been edited by oldmoney (edited January 31, 2000).]

[This message has been edited by oldmoney (edited February 11, 2000).]
Quote Reply
Re: Requiring a file upload... In reply to
Got it (though trial and error for about an hour)... added
Code:
if (length($Filename) < 1) {
$message = "You did not select a file to upload. Please select a file on your computer, and attempt to upload it again.";
&cgierr;
exit;
}
before the following line
Code:
$FILES_UPLOADED = scalar(keys(%Confirmation));



------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)

[This message has been edited by oldmoney (edited February 11, 2000).]
Quote Reply
Re: Requiring a file upload... In reply to
That is the key to success...trial and error.

I really appreciate your initiative and determination, oldmoney. I wish that other Gosssamer Threads users had those qualities.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Requiring a file upload... In reply to
When I was younger, those qualities were often referred to as impatience and stubborn-headedness... Wink

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Requiring a file upload... In reply to
Well, anyway...I appreciate your efforts at making things work rather than demanding mods or not even taking the time to search the forums for information or look in the Resource Center.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------