uppy-s3_multipart 1.1.0 → 1.2.1
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.
- checksums.yaml +4 -4
- data/lib/uppy/s3_multipart/app.rb +13 -0
- data/lib/uppy/s3_multipart/client.rb +1 -1
- data/uppy-s3_multipart.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 850751fff94e85ddaa7e9c6f458be83bad00b2730de0e11809c86d9667f7db9d
|
4
|
+
data.tar.gz: c5fa81daeb9652cb387db98dbcf1d2318a3982e5827f6eff7f6edb31c9c91ccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fde164448cac2a97a8f2788956eaacc5a8f5ce0730730ff3514157cd60e733ee924049a2d7e88cc759c6858d67dd28a205e64c4eb6ba8fc6f756998c3e8b0878
|
7
|
+
data.tar.gz: 1714c8d5b5ef25159b26138f488dbd64c58f6147574a1f1f389b2e2859f89df2565818fa7d072fd0581e082d1498358ed26cf1928f5b1fee598f461603093f44
|
@@ -75,6 +75,19 @@ module Uppy
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
# GET /s3/multipart/:uploadId/batch
|
79
|
+
r.get String, "batch" do |upload_id|
|
80
|
+
key = param!("key")
|
81
|
+
part_numbers = param!("partNumbers").split(",")
|
82
|
+
|
83
|
+
batch = part_numbers.map do |part_number|
|
84
|
+
result = client_call(:prepare_upload_part, upload_id: upload_id, key: key, part_number: part_number)
|
85
|
+
[part_number, result.fetch(:url)]
|
86
|
+
end.to_h
|
87
|
+
|
88
|
+
{ presignedUrls: batch }
|
89
|
+
end
|
90
|
+
|
78
91
|
# GET /s3/multipart/:uploadId/:partNumber
|
79
92
|
r.get String, String do |upload_id, part_number|
|
80
93
|
key = param!("key")
|
@@ -25,7 +25,7 @@ module Uppy
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def prepare_upload_part(upload_id:, key:, part_number:, **options)
|
28
|
-
presigned_url = presigner.presigned_url
|
28
|
+
presigned_url = presigner.presigned_url :upload_part,
|
29
29
|
bucket: bucket.name,
|
30
30
|
key: object(key).key,
|
31
31
|
upload_id: upload_id,
|
data/uppy-s3_multipart.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uppy-s3_multipart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
193
|
+
rubygems_version: 3.3.3
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: Provides a Rack application that implements endpoints for the AwsS3Multipart
|