Gossamer Forum
Home : Products : DBMan : Customization :

Multiple File Upload

Quote Reply
Multiple File Upload
I would like to know, if there is a solution for uploading more than one file per record. I think this would be of general interest.
Quote Reply
Re: Multiple File Upload In reply to
The number would most likely be a finite amount of images unless you created a database field or entire databse with the relational mod.

But, a quick solution would be to say.. allow 5 images. I'm no perl guru, but it shouldn't be too hard. Just add fields to the form for $rec('id')-1.gif $rec('id')-2.gif $rec('id')-3.gif $rec('id')-4.gif $rec('id')-5.gif .. etc. It would just require some minor modifications to do this .. and you could put a test for various ones in your display routine.. like if $rec('id')-1 = thumbnial etc..

This is just off the top of my head but should give someone the right idea. And my code above is just ref examples .. I do plan on doing this to my setup soon. Just have to finish some other modding first!

------------------
The Crowe crowe@charter.net
www.lit.org Links Engine for Writing on the net!



Quote Reply
Re: Multiple File Upload In reply to
I've never gotten it to work sucessfully (e.g. an image and its thumbnail). As I've said elsewhere, only one file can get uploaded at a time (always the thumbnail), even if paths to both images are specified. In order to get both images uploaded, the thumbnail must be uploaded first, then the full size image can be uploaded by modifying the record. If one attempts to upload the full size image first, then the thumbnail, the full size image is deleted during the thumbnail upload process. No solution forthcoming from me... very low on my developmental priority list since I'm the only one doing the uploading thus far.


------------------
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: Multiple File Upload In reply to
Maybe there's a way to implement another script like Fileman into DBMan. If anyone did this for all the important routines (add, modify, delete, view) please let us know.
Quote Reply
Re: Multiple File Upload In reply to
Spitfire:

Have you considered using an external script for uploading?

You can then just have the user enter the actual image name in a field rather then having it specifically identified by their record number.

This script does the exact same thing as the file upload as far as ease of use in uploading files to your server. I use this for my auction for users to upload their graphics and it works great.

Check out:

SDPUpload Version 1.0
Copyright 1999
Michael B. Jones
http://www.shindigproductions.com
Quote Reply
Re: Multiple File Upload In reply to
Sounds good!
But what happens when modifying or deleting a record? Can you change the pictures or delete them? If so, how do you do this from within the script? That's the point for me: I don't want to have any additional work with the uploaded pics and there shouldn't be any useless pictures on the server after deleting a record.
Quote Reply
Re: Multiple File Upload In reply to
Well, don't think you could get away without having the extra work Smile

For my auction site I know that the pictures will not remain for longer then 1 month, so I just look in the directory (via FTP) and delete any pics older then 30 days.

The only other solution would be to perhaps not store these graphics on your server, but rather have the users provide a link to the graphic on their server.

If you delete records yourself you could just jot down the name of the graphics when you delete records and then FTP to your server and delete the associated graphics. If the users delete their own records, that would be a different story Smile

Sorry I could not be of more help.