public
Description: Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
Homepage: http://weblog.techno-weenie.net
Clone URL: git://github.com/technoweenie/attachment_fu.git
Click here to lend your support to: attachment_fu and make a donation at www.pledgie.com !
Adding various MIME types that some browsers or applications provide for 
tstandard image types.
squarelover (author)
Tue Sep 16 10:03:00 -0700 2008
commit  d2da9f32afd783e9c23835c3e9ecf5b7846d2a7d
tree    0ea86d49121dd454736f553a9f51e8a722844b90
parent  e475cf78a49ede1ba6c83fdae7028d7d9da4cd85
...
2
3
4
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
7
8
...
2
3
4
 
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
0
@@ -2,7 +2,36 @@ module Technoweenie # :nodoc:
0
   module AttachmentFu # :nodoc:
0
     @@default_processors = %w(ImageScience Rmagick MiniMagick Gd2 CoreImage)
0
     @@tempfile_path = File.join(RAILS_ROOT, 'tmp', 'attachment_fu')
0
- @@content_types = ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg']
0
+ @@content_types = [
0
+ 'image/jpeg',
0
+ 'image/pjpeg',
0
+ 'image/jpg',
0
+ 'image/gif',
0
+ 'image/png',
0
+ 'image/x-png',
0
+ 'image/jpg',
0
+ 'image/x-ms-bmp',
0
+ 'image/bmp',
0
+ 'image/x-bmp',
0
+ 'image/x-bitmap',
0
+ 'image/x-xbitmap',
0
+ 'image/x-win-bitmap',
0
+ 'image/x-windows-bmp',
0
+ 'image/ms-bmp',
0
+ 'application/bmp',
0
+ 'application/x-bmp',
0
+ 'application/x-win-bitmap',
0
+ 'application/preview',
0
+ 'image/jp_',
0
+ 'application/jpg',
0
+ 'application/x-jpg',
0
+ 'image/pipeg',
0
+ 'image/vnd.swiftview-jpeg',
0
+ 'image/x-xbitmap',
0
+ 'application/png',
0
+ 'application/x-png',
0
+ 'image/gi_'
0
+ ]
0
     mattr_reader :content_types, :tempfile_path, :default_processors
0
     mattr_writer :tempfile_path
0
 

Comments

    No one has commented yet.