Browse files

added mov as an available attachment, encreased the size of the attac…

…hed file allowed (this should be controlled at the nginx anyways)
  • Loading branch information...
1 parent ba52445 commit 29f418fbe561fc2071092be2383e5a45b10c432b dmitry committed Mar 3, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/models/message.rb
  2. BIN public/images/icons/video_large.jpg
@@ -76,8 +76,8 @@ def post_process_attachment
set_property :delta => true
- validates_attachment_size :attachment, :less_than => 8.megabytes
- validates_attachment_content_type :attachment, :content_type => [ 'application/msword', 'application/pdf', 'application/x-pdf', 'application/rtf', 'text/plain', 'image/gif', 'image/jpeg', 'image/png', 'image/tiff', 'image/rgb', 'application/zip', 'application/x-gzip' ]
+ validates_attachment_size :attachment, :less_than => 300.megabytes
+ validates_attachment_content_type :attachment, :content_type => [ 'video/quicktime', 'application/msword', 'application/pdf', 'application/x-pdf', 'application/rtf', 'text/plain', 'image/gif', 'image/jpeg', 'image/png', 'image/tiff', 'image/rgb', 'application/zip', 'application/x-gzip' ]
validates_presence_of :user_id, :conversation_id, :message
validates_format_of :something, :with => /^$/ # anti spam, honeypot field must be blank
@@ -100,6 +100,7 @@ def attachment_type
when /text/; "txt"
when /zip/; "zip"
when /image/; "image"
+ when /video/; "video"
else; "unknow"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 29f418f

Please sign in to comment.