Home : Products : DBMan : Customization :

Products: DBMan: Customization: Help with File Upload (upload graphics mod): Edit Log

Here is the list of edits for this post
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

Edit Log: