Viewing Article
File uploads -- Mar 29 2007, 10:47 AM
There are really two choices:
1) Are you going to send the attachment by email?
2) Are you going to save the file to your server?
That gives you four possible combinations:
yes - yes
yes - no
no - no
no -yes
To send files as an attachment you do NOT need to create a directory on your server and you do NOT need to change the permissions (more on this later). This feature is special to Ultimate Form Mail. It gives you the highest degree of safety if all you want to do is have visitors email a file to you from your contact form.
Now, if you want to save the uploads to your server, then yes, you need to have an upload directory and yes, you do need to set the permissions in such a way that your server can save the digital data.
On my servers, this means using a permissions setting of 0777 (or just 777, same thing).
Geek speak for this process is CHMOD but all you do is connect to your server by ftp, right click on the directory you want to use as your upload storage, and choose 'Change permissions' or something similar, and either check all the boxes, or type in 777.
Now, I've seen some readme docs for unrelated software discuss using lower settings. I think I've seen 666 or 755. Technically, the lower the number while still accomplishing the goal, the more secure.
But... don't get upset and depressed if you have to resort to 777. It's no big deal.
Configuring UFMail
You need to tell Ultimate Form Mail where to save the files if you are indeed choosing to save the files on your server. The full path of the web server directory you are using as your upload target is what you need to add to the controls.php file.
For many servers, it will look like this:
/home/username/public_html/ufm/uploads
Where username is the actual username for your hosting account, and /ufm/uploads is the location of the uploads directory on your server. It could just as easily be just /uploads
What will definitely NOT work is your full url: http://www.yoursite.com (won't work)
Other settings
$set['file_max_size'] = '500';/*Max file size in KB*/
$set['file_max_size_total'] = '500';/*If more than one file, this is the maximum total upload size for all attachments combined*/
The first setting is the kb size of the maximum file you will allow. Change this as you see fit.
The second setting is the kb size of the maximum TOTAL upload, when all file sizes are added together.
For example, if you allow 500kb per file, and 500kb total, then your visitor will get an error message when they try to upload two 300kb files, even though they are both well under the limit for max file size.
$set['banned_ext'] = array('php', 'phtml', 'cgi', 'pl', 'asp', 'jsp', 'c', 'cfm', 'shtml', 'exe', 'bat', 'com');
Pretty easy - it's an array of file extensions you don't want to allow being uploaded or sent to you by email.
Questions -
"Can I upload without sending an attachment?"
Yes. Set attachment to 0, and upload to 1.
1) Are you going to send the attachment by email?
2) Are you going to save the file to your server?
That gives you four possible combinations:
yes - yes
yes - no
no - no
no -yes
To send files as an attachment you do NOT need to create a directory on your server and you do NOT need to change the permissions (more on this later). This feature is special to Ultimate Form Mail. It gives you the highest degree of safety if all you want to do is have visitors email a file to you from your contact form.
Now, if you want to save the uploads to your server, then yes, you need to have an upload directory and yes, you do need to set the permissions in such a way that your server can save the digital data.
On my servers, this means using a permissions setting of 0777 (or just 777, same thing).
Geek speak for this process is CHMOD but all you do is connect to your server by ftp, right click on the directory you want to use as your upload storage, and choose 'Change permissions' or something similar, and either check all the boxes, or type in 777.
Now, I've seen some readme docs for unrelated software discuss using lower settings. I think I've seen 666 or 755. Technically, the lower the number while still accomplishing the goal, the more secure.
But... don't get upset and depressed if you have to resort to 777. It's no big deal.
Configuring UFMail
You need to tell Ultimate Form Mail where to save the files if you are indeed choosing to save the files on your server. The full path of the web server directory you are using as your upload target is what you need to add to the controls.php file.
For many servers, it will look like this:
/home/username/public_html/ufm/uploads
Where username is the actual username for your hosting account, and /ufm/uploads is the location of the uploads directory on your server. It could just as easily be just /uploads
What will definitely NOT work is your full url: http://www.yoursite.com (won't work)
Other settings
$set['file_max_size'] = '500';/*Max file size in KB*/
$set['file_max_size_total'] = '500';/*If more than one file, this is the maximum total upload size for all attachments combined*/
The first setting is the kb size of the maximum file you will allow. Change this as you see fit.
The second setting is the kb size of the maximum TOTAL upload, when all file sizes are added together.
For example, if you allow 500kb per file, and 500kb total, then your visitor will get an error message when they try to upload two 300kb files, even though they are both well under the limit for max file size.
$set['banned_ext'] = array('php', 'phtml', 'cgi', 'pl', 'asp', 'jsp', 'c', 'cfm', 'shtml', 'exe', 'bat', 'com');
Pretty easy - it's an array of file extensions you don't want to allow being uploaded or sent to you by email.
Questions -
"Can I upload without sending an attachment?"
Yes. Set attachment to 0, and upload to 1.
kmholmes5555 -- Dec 15 2007, 12:33 AM
The files are uploaded with the permission 600. I can't download with that permission (ftp). I'm using Fedora Core 4 and Apache. Any thoughts what I can do?
folcklord -- Jul 21 2010, 2:35 AM
BmPieN <a href="http://vpkcdmujdrlt.com/">vpkcdmujdrlt</a>, [url=http://ianqexpywegu.com/]ianqexpywegu[/url], [link=http://vpoknvgccswz.com/]vpoknvgccswz[/link], http://xjmuwuwgunsl.com/
lymanknap -- Aug 5 2010, 1:16 AM
HCJ0SZ <a href="http://cipdsyqqmnxp.com/">cipdsyqqmnxp</a>, [url=http://dmvtutwvblac.com/]dmvtutwvblac[/url], [link=http://mqebopogvpgo.com/]mqebopogvpgo[/link], http://uncpcqrymtnv.com/

