PDA

View Full Version : Allow Customers to Upload Images


GeekyGirl
02-17-2008, 10:59 AM
Hello,

I need to be able to have customers upload images to a directory but don't know how to set it up. I would prefer to have a secure way of doing it so I don't get a bunch of junk files uploaded. Also can I restrict what file types they will be able to upload?

Any help to get me started would be great!

redsox9
02-17-2008, 02:07 PM
You might try setting up an FTP account where people can upload these files. If you want to make it more secure, don't allow anonymous access; give your customers a user name and password to access the folder.

bobdog
02-17-2008, 09:12 PM
I have a script for this. Found it somewhere at hotscripts. You're welcome to it.

Bob

bobdog
02-17-2008, 09:43 PM
Here it is, I had to search for that one...it moved.

http://www.codewalkers.com/c/a/File-Manipulation-Code/Multiple-File-Upload/

Works great for me. You might need to edit the php.ini file to accept uploads larger than two meg.

felgall
02-17-2008, 10:37 PM
Using FTP is the better option for files over 1Mb as above that size HTTP becimes very inefficient.

GeekyGirl
02-19-2008, 08:12 PM
Thanks so much. Sorry for the delay...i wasn't receiving the emails.

I'll test out the script that was posted to see if it will work.

How do you build a web page with FTP access on it so it is user friendly?

Arithan
02-25-2008, 01:50 AM
I would also like to know how to create a form to upload via ftp instead of http. I keep reading about how I should use ftp for large files, especially from felgall in almost all threads dealing with uploads, but I have yet to see any php scripts that can do this.

I basically want to use a file field on a form where the user can browse thru their hard drive to find the file they want to upload. Then when they click the Upload button, it will upload to the uploads folder on the server via ftp.

Basil
02-25-2008, 05:19 AM
As a webmaster, I would never allow FTP access to visitors. There are far too many security issues that would arise from it.

About efficiency, I am also very interested in hearing how FTP outpaces HTTP.

felgall
02-25-2008, 11:13 AM
I haven't seen any actual figures on how http and ftp compare on their file transfer efficiency but http is designed to process web pages which would normally have a combined file size of at most 100k per page while ftp is designed for transferring files between systems where individual files can be huge. The processing required to efficiently transfer a couple of dozen files each of which is only a few k in size is a lot different from what is required to process one file that is several Gb in size. If both situations could be handled as efficiently with the same protocol then there would be no need for both http and ftp.

The security issues associated with allowing visitors to upload files are the same regardless of whether ftp or hppt is used.

falls
05-23-2008, 03:52 PM
GeekyGirl, I have a similar question.

I need a photographer to be able to upload to a password protected folder I made. This folder is now used for press to view photos right now.

I don't want to give the photographer full access, so I won't give her the username and password I use.

Have you figured out how to do this, GeekyGirl?
Does anyone have advice?
TIA