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.
Mar 19, 2000, 10:44 AM
User (183 posts)
Mar 19, 2000, 10:44 AM
Post #2 of 7
Views: 1722
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!
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!
Mar 19, 2000, 5:30 PM
User (431 posts)
Mar 19, 2000, 5:30 PM
Post #3 of 7
Views: 1721
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)
------------------
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)
Mar 19, 2000, 10:35 PM
Veteran / Moderator (3034 posts)
Mar 19, 2000, 10:35 PM
Post #5 of 7
Views: 1731
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
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
Mar 19, 2000, 11:26 PM
Novice (33 posts)
Mar 19, 2000, 11:26 PM
Post #6 of 7
Views: 1724
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.
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.
Mar 20, 2000, 10:38 AM
Veteran / Moderator (3034 posts)
Mar 20, 2000, 10:38 AM
Post #7 of 7
Views: 1730
Well, don't think you could get away without having the extra work
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
Sorry I could not be of more help.

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

Sorry I could not be of more help.