Forum Moderators: coopster

Message Too Old, No Replies

Picture Gallery idea need suggestions

         

havoc

1:54 am on Feb 20, 2004 (gmt 0)

10+ Year Member



I have a site where i need to be able to have images uploaded (up to 80 at a time). The problem is im not sure exactly how to go about adding these pics. Should i have a form that has lets say 10 input boxes and a submit .. or get them to ftp and get php to get the files names and add them to the db .

If i do the get file names thing has anyone got a script that will get a list of all the jpg's or gif's in the dir and one at a time add it to a db?

i could right most of it but havent done any file control stuff as yet

webadept

7:20 am on Feb 20, 2004 (gmt 0)

10+ Year Member



The problem you will face with a upload of several image files will be time. Typically, the PHP.ini file is set to time out when a load takes to long. Also, you have a size limit as well. You will have to check both of those before you can really figure out what you can do here.

If you can get the time and size to a good spot, for instance, you can have the user, load a zip file of all the images, with a text file as well if they would like.

Once the zip is loaded, the server unzips it, gets the text file which is formated something like

er0045.jpg¦Eddie My Cat
er0046.jpg¦Eddie Eating my leg
er0047.jpg¦Eddie Eating the Policeman's Gun
er0048.jpg¦Eddie the King of the Computer Desk

and so on. This this gets the file name and prefered title of the image into the database, and puts the images into a prefered directory. But if you can't upload a file greater tha 2 mgs, it may not be worth the coding effort.

Using the multiple forms is a good idea, but then you are pushing the time limit the server is going to put up with, before it times out the load.

Anyway, that's your first step, is to find out those and to see what changes you can make to them.

havoc

5:37 am on Feb 25, 2004 (gmt 0)

10+ Year Member



ok thanks .. i think i found a soltuion..