incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wso...@apache.org
Subject svn commit: r738575 - in /incubator/olio/webapp/rails/trunk/app/models: document.rb image.rb
Date Wed, 28 Jan 2009 18:23:01 GMT
Author: wsobel
Date: Wed Jan 28 18:23:01 2009
New Revision: 738575

URL: http://svn.apache.org/viewvc?rev=738575&view=rev
Log:
OLIO-36: Added charset to content types for attachment fu. (Mandy Waite)

Modified:
    incubator/olio/webapp/rails/trunk/app/models/document.rb
    incubator/olio/webapp/rails/trunk/app/models/image.rb

Modified: incubator/olio/webapp/rails/trunk/app/models/document.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/app/models/document.rb?rev=738575&r1=738574&r2=738575&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/app/models/document.rb (original)
+++ incubator/olio/webapp/rails/trunk/app/models/document.rb Wed Jan 28 18:23:01 2009
@@ -11,7 +11,8 @@
 
 class Document < ActiveRecord::Base
   
-  has_attachment :content_type => ['application/pdf', 'application/msword', 'text/plain'],
+  has_attachment :content_type => ['application/pdf', 'application/pdf; charset=ISO-8859-1',
+                                   'application/msword', 'text/plain'],
                  :storage => :file_system, 
                  :path_prefix => DOCUMENT_STORE_PATH
   

Modified: incubator/olio/webapp/rails/trunk/app/models/image.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/app/models/image.rb?rev=738575&r1=738574&r2=738575&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/app/models/image.rb (original)
+++ incubator/olio/webapp/rails/trunk/app/models/image.rb Wed Jan 28 18:23:01 2009
@@ -13,6 +13,10 @@
 #  thumbnail    :string(255)     
 #
 
+unless Technoweenie::AttachmentFu.content_types.include? 'image/jpeg; charset=ISO-8859-1'
+  Technoweenie::AttachmentFu.content_types << 'image/jpeg; charset=ISO-8859-1'
+end
+
 class Image < ActiveRecord::Base
   has_attachment :content_type => :image, 
                  :storage => :file_system, 



Mime
View raw message