Page 1 of 1

Image Gallery Uploads

Posted: Sun Feb 06, 2005 3:47 pm
by mchaggis
Hi,

I have an interestig idea/problem.

I have written a gallery application which offer the ability to upload several images at once, however, I used it myself to try and upload a gallery of a trip to scotland I'd had and soon face how annoying the application is when you have 100's of pictures to upload.

So I wrote a script that scanned a directory on the webserver for images that had not been stored in the database yet, with the plan that I could upload, via ftp, to a directory on the server. This works great for me. However, I'd like to take it to the next step....

I admin a server for my webcms sites and do not offer ftp access to these as ALL access is through a web interface, but I like the advantages of ftp for the upload of images... This got me thinking, I started wondering if it was possible to create some sort of temporary username and directory that allowed the user to click a button and then for them to upload their images via ftp, then process images and remove acess...


So, my question... Does anyone know where I would start? Has anyone done anything similar? Is there anything hat I should be aware of?

what I would do

Posted: Sun Feb 06, 2005 8:05 pm
by s.dot
What I would do is this

Code: Select all

<form action="uploadpics.php" method="post">
<input type="hidden" name="action" value="uploadpics">

for($i=0;$i<100;$i++)&#123;
<input type="file" name="filetoupload" size="50"> &#125;
<input type="submit" value="Upload">
</form>
Then upon submission of the form, use PHP to create a folder on the webserver generated with a random name. Then log that folders random name into the database in association with that person. Then when you call your image gallery script to display the folder, it will show all pics in that directory.

I hope this is what you were asking for. I couldn't really get a clear explanation of what you were trying to do.


feyd | please use the formatting tags we provide

Posted: Mon Feb 07, 2005 4:27 am
by mchaggis
That is what I am doing at the moment.. Presently the user with about 25 file upload boxes but it is very unfriendly and time consuming when having to upload this many images.

What I am after is not so much a PHP solution I suppose, but a way to create temporary ftp users that are only available for say one session or for a time limit

Posted: Mon Feb 07, 2005 5:59 am
by timvw
therefor you need to read the documentation of your ftp-server. i have fe: proftpd with authentication against ldap and it's not that difficult to manage users (and the expiration date etc...)