dm-paperclip-r3 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dm-paperclip-r3/attachment.rb +5 -15
- data/lib/dm-paperclip-r3.rb +1 -1
- metadata +3 -3
@@ -77,21 +77,11 @@ module Paperclip
|
|
77
77
|
|
78
78
|
return nil if uploaded_file.nil?
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
instance_write(:content_type, uploaded_file['content_type'] ? uploaded_file['content_type'].strip : uploaded_file['tempfile'].content_type.to_s.strip)
|
86
|
-
instance_write(:file_size, uploaded_file['size'] ? uploaded_file['size'].to_i : uploaded_file['tempfile'].size.to_i)
|
87
|
-
instance_write(:updated_at, Time.now)
|
88
|
-
else
|
89
|
-
@queued_for_write[:original] = uploaded_file.to_tempfile
|
90
|
-
instance_write(:file_name, uploaded_file.original_filename.strip.gsub(/[^\w\d\.\-]+/, '_'))
|
91
|
-
instance_write(:content_type, uploaded_file.content_type.to_s.strip)
|
92
|
-
instance_write(:file_size, uploaded_file.size.to_i)
|
93
|
-
instance_write(:updated_at, Time.now)
|
94
|
-
end
|
80
|
+
@queued_for_write[:original] = to_tempfile(uploaded_file)
|
81
|
+
instance_write(:file_name, uploaded_file.original_filename.strip)
|
82
|
+
instance_write(:content_type, uploaded_file.content_type.to_s.strip)
|
83
|
+
instance_write(:file_size, uploaded_file.size.to_i)
|
84
|
+
instance_write(:updated_at, Time.now)
|
95
85
|
|
96
86
|
@dirty = true
|
97
87
|
|
data/lib/dm-paperclip-r3.rb
CHANGED
@@ -44,7 +44,7 @@ require 'dm-paperclip-r3/attachment'
|
|
44
44
|
# documentation for Paperclip::ClassMethods for more useful information.
|
45
45
|
module Paperclip
|
46
46
|
|
47
|
-
VERSION = "2.4.
|
47
|
+
VERSION = "2.4.3"
|
48
48
|
|
49
49
|
# To configure Paperclip, put this code in an initializer, Rake task, or wherever:
|
50
50
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-paperclip-r3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 2.4.
|
9
|
+
- 3
|
10
|
+
version: 2.4.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joel Reed
|