activeadmin_jfu_upload 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activeadmin/jfu_upload/engine.rb +3 -2
- data/lib/activeadmin/jfu_upload/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ed0960f1a3e3e097bdeb630128835d7df87582d
|
4
|
+
data.tar.gz: 9a1cf56ea4e403c8cefc1bab5694f952a1fa682f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 175df804b3b952933038fbdc0fa9189e79070dcf30406a85317d45ac7498ec4abfebc0d328c598976291b60533ca175761c68803d66dee077474e16fb5576221
|
7
|
+
data.tar.gz: f2e0c38b8f60cdc5e9bfd1036d3b48f2af8cc7b144ae3bb9ae7e17ee148e117ae16be17c81db64461f06cec3fcfb9e02df84a0ca847687a943abab107ba2687b
|
@@ -15,6 +15,7 @@ module ActiveAdmin
|
|
15
15
|
else
|
16
16
|
m = request.headers['CONTENT-RANGE'].match( /[^\s]+\s(\d+)-(\d+)\/(\d+)/ )
|
17
17
|
if m
|
18
|
+
buffer = param.read
|
18
19
|
pos = m[1].to_i
|
19
20
|
if pos == 0
|
20
21
|
# resource.update field => param
|
@@ -24,9 +25,9 @@ module ActiveAdmin
|
|
24
25
|
resource.update_column field, YAML::dump( field_data )
|
25
26
|
else
|
26
27
|
field_data = YAML::load resource.read_attribute(field)
|
27
|
-
# File.open( resource.try( field ).try( :path ), 'ab' ) { |f| f.write(
|
28
|
+
# File.open( resource.try( field ).try( :path ), 'ab' ) { |f| f.write( buffer ) }
|
28
29
|
end
|
29
|
-
File.open(field_data[:tempfile], 'ab') { |f| f.write(
|
30
|
+
File.open(field_data[:tempfile], 'ab') { |f| f.write(buffer) }
|
30
31
|
if ( m[2].to_i + 1 ) == m[3].to_i
|
31
32
|
path = Pathname.new field_data[:tempfile]
|
32
33
|
dst = path.dirname.join(field_data[:original_filename]).to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_jfu_upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
66
|
rubyforge_project:
|
67
|
-
rubygems_version: 2.6.
|
67
|
+
rubygems_version: 2.6.13
|
68
68
|
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: jQuery-File-Upload for ActiveAdmin
|