Forum Moderators: mack

Message Too Old, No Replies

Allowing a client to upload images

Using a browse button to upload images.

         

RosscoPK

9:11 am on Jun 8, 2004 (gmt 0)

10+ Year Member



I've recently designed a site for someone who wants a page where they can upload images, to be displayed on another page - on the same site.

The client doesn't know anything about FTP or HTML, hence the reason for wanting to do it this way.

So basically, they go to page on the site, that only they know about, and on that page is a simple 'Browse' button. They then select which image they want and it then displays this image on a particular page for everyone to see.

Is this difficult to do? Any help would be greatly appreciated.

Strange

3:08 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



Hi RosscoPK... It's not hard to create the field itself. It's just an input attribute in a form. However, you would need some backend programming to handle what to do with the image.

VectorJ

4:10 pm on Jun 8, 2004 (gmt 0)

10+ Year Member




<form method="post" action="upload_images.cgi" enctype="multipart/form-data">
Image file:
<input type=file name=uploaded_image size=29>
<input type=submit value="Upload image">
</form>

Note that the enctype for the form needs to be "multipart/form-data".

As for the script to handle the upload, I have one in Perl, but I'm guessing that you use Windows, so it probably wouldn't do you much good. Sticky mail me if you could use it though, and I'll send it to you.

digitalv

4:15 pm on Jun 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're on a Windows server, check out ASPUpload from Persits.com - they also have a product called XUpload where you can drag & drop pictures to your web browser. Pretty freakin cool.

If you're not on a Windows server, maybe you should be.

coopster

1:25 pm on Jun 9, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Xupload only works with MS IE browsers. You may want to consider alternatives that are browser-independent. Some other packages you may want to consider that are free and quite popular:

Gallery [gallery.menalto.com]
Tiki [tikiwiki.org]
Coppermine [coppermine.sourceforge.net]