diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-05-31 18:33:38 -0400 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-05-31 18:33:38 -0400 |
commit | abe68f4318009ed839c1998d91459f26d09f76c8 (patch) | |
tree | d90c98c9aa49f05abb8da3acf9703074386f50f8 | |
parent | ebeb5f744cbfd5bfea0da1b350a3757865ec4b3b (diff) |
Added attachments config descriptions to README.
-rw-r--r-- | README | 24 | ||||
-rw-r--r-- | lib/noticeform.php | 8 |
2 files changed, 23 insertions, 9 deletions
@@ -1204,11 +1204,27 @@ The software lets users upload files with their notices. You can configure the types of accepted files by mime types and a trio of quota options: per file, per user (total), per user per month. +We suggest the use of the pecl file_info extension to handle mime type +detection. + supported: an array of mime types you accept to store and distribute, - like 'image/gif', 'video/mpeg', 'audio/mpeg', etc. -file_quota: maximum size for a single file upload in bytes. -user_quota: total size in bytes a user can store. -monthly_quota: total size permitted in the current month. + like 'image/gif', 'video/mpeg', 'audio/mpeg', etc. Make sure you + setup your server to properly reckognize the types you want to + support. + +For quotas, be sure you've set the upload_max_filesize and post_max_size +in php.ini to be large enough to handle your upload. In httpd.conf +(if you're using apache), check that the LimitRequestBody directive isn't +set too low (it's optional, so it may not be there at all). + +file_quota: maximum size for a single file upload in bytes. A user can send + any amount of notices with attachments as long as each attachment + is smaller than file_quota. +user_quota: total size in bytes a user can store on this server. Each user + can store any number of files as long as their total size does + not exceed the user_quota. +monthly_quota: total size permitted in the current month. This is the total + size in bytes that a user can upload each month. Troubleshooting diff --git a/lib/noticeform.php b/lib/noticeform.php index 707768cd5..5f438327d 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -137,9 +137,6 @@ class NoticeForm extends Form { $this->out->element('label', array('for' => 'notice_data-text'), sprintf(_('What\'s up, %s?'), $this->user->nickname)); - $this->out->elementStart('span', array('style' => 'float: right; margin-top: 2em;')); -// $this->out->element('a', array('href' => '#attach'), ' [ATTACH]'); - $this->out->elementEnd('span'); // XXX: vary by defined max size $this->out->element('textarea', array('id' => 'notice_data-text', 'cols' => 35, @@ -152,15 +149,16 @@ class NoticeForm extends Form '140'); $this->out->elementEnd('dl'); $this->out->element('br', array('style' => 'clear:both')); -// $this->out->elementStart('a', array('href' => '#')); $this->out->element('label', array('for' => 'notice_data-attach'), _('Upload: ')); -// $this->out->elementEnd('a'); $this->out->element('input', array('id' => 'notice_data-attach', 'type' => 'file', 'name' => 'attach')); if ($this->action) { $this->out->hidden('notice_return-to', $this->action, 'returnto'); } $this->out->hidden('notice_in-reply-to', $this->action, 'inreplyto'); + + $this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); + } /** |