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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3d7712b2f5d9b2dd18d9bf4292905a2d2e75acf33b59088162313b762b870fc
4
- data.tar.gz: 2677578c6ca2c73fe65c64ba779bfd9a7d00501e7f93da85576ce9364800cdef
3
+ metadata.gz: e12372444e16d107d5c90ec8af0a414ce4be9cb80789104d876ccbcb659f2e47
4
+ data.tar.gz: 72b57faaed4df24f0e5614f7b9fe2a9129773bd3dfeba2e34c13929f930df196
5
5
  SHA512:
6
- metadata.gz: af9554216d54735f7ee792bdd08194b950fa3f43730b085898a8b447bb51648be03f1bae126beb2f0ff3234186b422ba7dc363c5eba051aa9bc3df88e412b2a8
7
- data.tar.gz: 12ea6a1d7a75b90c6b30a001c4215ef4ed5b6026b9e2f8e4b41dfe94041351b539f6680851b18361682d5ad1f61345b76081a3d907940e1aa4dcffbb6f969cda
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) do
276
+ create_multipart_upload: -> (request) {
275
277
  { key: SecureRandom.uuid }
276
- end
278
+ }
277
279
  }
278
280
  ```
279
281
 
280
- In that case a [`Rack::Request`] object is also passed to the block. The
281
- initial request to `POST /s3/multipart` will contain `type` and `filename`
282
- query parameters, so for example you could use that to make requesting the URL
283
- later force a download with the original filename (using the
284
- [content_disposition] gem):
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) do
290
+ create_multipart_upload: -> (request) {
289
291
  filename = request.params["filename"]
290
292
 
291
293
  { content_disposition: ContentDisposition.attachment(filename) }
292
- end
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
- #### `create_multipart_upload`
340
+ #### `#create_multipart_upload`
339
341
 
340
342
  Initiates a new multipart upload.
341
343
 
@@ -32,7 +32,7 @@ module Uppy
32
32
 
33
33
  route do |r|
34
34
  # POST /s3/multipart
35
- r.post true do
35
+ r.post ["", true] do
36
36
  content_type = r.params["type"]
37
37
  filename = r.params["filename"]
38
38
 
@@ -1,11 +1,11 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "uppy-s3_multipart"
3
- gem.version = "0.3.0"
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-m/uppy-s3_multipart"
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.0
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: 2018-12-19 00:00:00.000000000 Z
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-m/uppy-s3_multipart
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
- rubyforge_project:
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