Gossamer Forum
Home : Products : DBMan : Customization :

Help with File Upload (upload graphics mod)

Quote Reply
Help with File Upload (upload graphics mod)
I've got the file upload mod installed and have it working. I use the single file upload mod and I don't require graphics to be uploaded.

Here's what I'd like to do...

######### Short Version ############
Use the "uid" instead of the "db_key" to keep track of the files (yes, I know, I know)... so that uploaded files will appear as "bob.1234566.txt" (instead of "1234.txt").

I looked through JPD's mod and only found two references to $db_key (for the parts I'm using - see her mod attached - note it has been stripped down to remove the options I'm not using).

I changed the $in{'$db_key'} to $in{'$db_uid'} but it didn't seem to work. The best I can tell the validate_upload sub is the only place where file names get "redone" for writing to the server.

Any help in pointing me in the "write" direction would be greatly appreciated. Tongue

########## Long Version ############
(this will help the above make more sense...)

1. I want my users to choose their upload file *before* they add a record and associate it with the uid (session) instead of a file name (since file name doesn't exist yet). This is optional. They don't have to upload a file if they don't want to. They will do this from the "home" page.

2. When they click "add new record" (from the "home page" to get to the add record form) the script will then run the validate_upload and stick a file on the server with uid.txt as the file name.

3. The user is now presented with the "Add Record" form where the following has happened:
(a) The script has opened and read the "text" file
(b) Parsed the data in the text file and populated the fields on the screen (and hidden) with the data from the uid.txt file
(c) And then has deleted (unlinked) the uid.txt file.

4. The user is now free to "add" the record or make changes before clicking add.

I'm basically giving my users a chance to upload data into a form from an "industry standard" type of output file instead of re-keying info that they already have in some type of software.

Last edited by:

Watts: Oct 10, 2005, 9:56 AM
Subject Author Views Date
Thread Help with File Upload (upload graphics mod) Watts 6273 Oct 10, 2005, 9:48 AM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
JPDeni 6205 Oct 10, 2005, 10:04 AM
Thread Re: [JPDeni] Help with File Upload (upload graphics mod)
Watts 6187 Oct 10, 2005, 11:02 AM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
JPDeni 6200 Oct 10, 2005, 11:39 AM
Thread Re: [JPDeni] Help with File Upload (upload graphics mod)
Watts 6148 Oct 11, 2005, 8:22 AM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
JPDeni 6133 Oct 11, 2005, 10:55 AM
Thread Re: [JPDeni] Help with File Upload (upload graphics mod)
Watts 6167 Oct 11, 2005, 12:28 PM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
JPDeni 6119 Oct 11, 2005, 2:03 PM
Thread Re: [JPDeni] Help with File Upload (upload graphics mod)
Watts 6134 Oct 11, 2005, 3:33 PM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
JPDeni 6116 Oct 11, 2005, 4:33 PM
Thread Re: [JPDeni] Help with File Upload (upload graphics mod)
Watts 6139 Oct 12, 2005, 7:32 AM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
Watts 6094 Oct 12, 2005, 1:09 PM
Thread Re: [Watts] Help with File Upload (upload graphics mod)
JPDeni 6092 Oct 12, 2005, 5:04 PM
Post Re: [JPDeni] Help with File Upload (upload graphics mod)
Watts 6086 Oct 13, 2005, 12:33 PM