Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 29f418fbe561fc2071092be2383e5a45b10c432b 1 parent ba52445
dmitry authored
View
5 app/models/message.rb
@@ -76,8 +76,8 @@ def post_process_attachment
set_property :delta => true
end
- 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"
end
end
View
BIN  public/images/icons/video_large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.