uppy-s3_multipart 0.3.0 → 0.3.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/README.md +13 -11
- data/lib/uppy/s3_multipart/app.rb +1 -1
- data/uppy-s3_multipart.gemspec +2 -2
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e12372444e16d107d5c90ec8af0a414ce4be9cb80789104d876ccbcb659f2e47
|
4
|
+
data.tar.gz: 72b57faaed4df24f0e5614f7b9fe2a9129773bd3dfeba2e34c13929f930df196
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc918fcce0cba1544acf9fe92996d81a3afc165c248cafe9ce6c615e1cd6c9d0feef8ec787b4269c0583f2478c7a94467b47964e41fb31aade21e11e569a5a03
|
7
|
+
data.tar.gz: cf5352bb5dbe444dc748eaa593b311a2545f0d1fdb4a0c2f0f3f364290e3a82acdbd7912536851a951aecc3ff872acb0580fd73cb60daf4af85757c2a32fc89e
|
data/README.md
CHANGED
@@ -264,32 +264,34 @@ parameters. The parameters can be provided statically:
|
|
264
264
|
```rb
|
265
265
|
options: {
|
266
266
|
create_multipart_upload: { cache_control: "max-age=#{365*24*60*60}" },
|
267
|
+
prepare_upload_part: { expires_in: 10 },
|
267
268
|
}
|
268
269
|
```
|
269
270
|
|
270
|
-
or generated dynamically for each request
|
271
|
+
or generated dynamically for each request, in which case a [`Rack::Request`]
|
272
|
+
object is also passed to the block:
|
271
273
|
|
272
274
|
```rb
|
273
275
|
options: {
|
274
|
-
create_multipart_upload: -> (request)
|
276
|
+
create_multipart_upload: -> (request) {
|
275
277
|
{ key: SecureRandom.uuid }
|
276
|
-
|
278
|
+
}
|
277
279
|
}
|
278
280
|
```
|
279
281
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
282
|
+
The initial request to `POST /s3/multipart` (which calls the
|
283
|
+
`#create_multipart_upload` operation) will contain `type` and `filename` query
|
284
|
+
parameters, so for example you could use that to make requesting the URL later
|
285
|
+
force a download with the original filename (using the [content_disposition]
|
286
|
+
gem):
|
285
287
|
|
286
288
|
```rb
|
287
289
|
options: {
|
288
|
-
create_multipart_upload: -> (request)
|
290
|
+
create_multipart_upload: -> (request) {
|
289
291
|
filename = request.params["filename"]
|
290
292
|
|
291
293
|
{ content_disposition: ContentDisposition.attachment(filename) }
|
292
|
-
|
294
|
+
}
|
293
295
|
}
|
294
296
|
```
|
295
297
|
|
@@ -335,7 +337,7 @@ require "uppy/s3_multipart/client"
|
|
335
337
|
client = Uppy::S3Multipart::Client.new(bucket: bucket)
|
336
338
|
```
|
337
339
|
|
338
|
-
####
|
340
|
+
#### `#create_multipart_upload`
|
339
341
|
|
340
342
|
Initiates a new multipart upload.
|
341
343
|
|
data/uppy-s3_multipart.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "uppy-s3_multipart"
|
3
|
-
gem.version = "0.3.
|
3
|
+
gem.version = "0.3.1"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.2"
|
6
6
|
|
7
7
|
gem.summary = "Provides a Rack application that implements endpoints for the AwsS3Multipart Uppy plugin."
|
8
|
-
gem.homepage = "https://github.com/janko
|
8
|
+
gem.homepage = "https://github.com/janko/uppy-s3_multipart"
|
9
9
|
gem.authors = ["Janko Marohnić"]
|
10
10
|
gem.email = ["janko.marohnic@gmail.com"]
|
11
11
|
gem.license = "MIT"
|
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: 0.3.
|
4
|
+
version: 0.3.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: 2019-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|
@@ -157,7 +157,7 @@ files:
|
|
157
157
|
- lib/uppy/s3_multipart/app.rb
|
158
158
|
- lib/uppy/s3_multipart/client.rb
|
159
159
|
- uppy-s3_multipart.gemspec
|
160
|
-
homepage: https://github.com/janko
|
160
|
+
homepage: https://github.com/janko/uppy-s3_multipart
|
161
161
|
licenses:
|
162
162
|
- MIT
|
163
163
|
metadata: {}
|
@@ -176,8 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
|
180
|
-
rubygems_version: 2.7.6
|
179
|
+
rubygems_version: 3.0.1
|
181
180
|
signing_key:
|
182
181
|
specification_version: 4
|
183
182
|
summary: Provides a Rack application that implements endpoints for the AwsS3Multipart
|