View Full Version : How to Allow Users to Upload Images to My Website?
mlegg
03-07-2013, 01:35 AM
I take care of a few of my churches websites. On 1 of them I would like to make a page that allows members to upload images. I will then take the images and place them on the site in galleries for people to see.
How can I accomplish this? I want it to be a page you have to input your name and email address so that I can verify who the images are from.
djr33
03-07-2013, 01:42 AM
You're suggesting doing a lot of this manually, so why not just ask them to email you the photos? That would obviously be easier to set up.
If not, you'll need to create a file upload form. You probably can't use a free form mailer because those don't usually allow any files (but you could look for one). This means you'll need to set up a form and then use PHP (or a similar language) to process it.
If you want to do this with PHP, you can start here:
http://php.net/manual/en/features.file-upload.php
That's fairly technical, but it's worth being aware of the information and there are a few examples.
Then just search Google for the many tutorials out there about uploading files.
Security is a major concern, at least if they can ever access the files directly. (If you're doing this manually, I'd suggest just hiding the images somewhere [usually outside of the http root folder is a good idea], then moving them once you've checked them.) If you do this automatically, which would be possible, so they'd immediately be visible on the website, you'd need to check that it's not a dangerous file type and potentially check the kind of image. There's also an issue of format and filesize. You'll probably want some way to reject especially large files (and dangerous file types, like .php).
As for the name and email, you can also do that with a form that will then (via PHP) send you an email confirming it. (Or you could have it save it in a database, or create a text file, etc.)
Easy answer: ask them to email the images.
More complex answer: learn how to use PHP (or a language like it) for doing this sort of thing-- it's a big project and will be challenging probably, but it's possible.
molendijk
03-07-2013, 07:06 AM
Or:
Put an iframe on one of your pages loading a wiki provided by wikidot.com.
mlegg
03-07-2013, 06:14 PM
that you for the input
molendijk
03-15-2013, 02:22 PM
It's all explained on their site.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.