Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uppy-s3_multipart
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
uppy-s3_multipart
Commits
493ec2db
Unverified
Commit
493ec2db
authored
6 years ago
by
Janko Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
README tweaks
parent
3425d340
master
…
v1.2.0
v1.1.0
v1.0.0
v0.3.4
v0.3.3
v0.3.2
v0.3.1
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
README.md
README.md
+13
-11
No files found.
README.md
View file @
493ec2db
...
...
@@ -264,32 +264,34 @@ parameters. The parameters can be provided statically:
```
rb
options:
{
create_multipart_upload:
{
cache_control:
"max-age=
#{
365
*
24
*
60
*
60
}
"
},
prepare_upload_part:
{
expires_in:
10
},
}
```
or generated dynamically for each request:
or generated dynamically for each request, in which case a
[
`Rack::Request`
]
object is also passed to the block:
```
rb
options:
{
create_multipart_upload:
->
(
request
)
do
create_multipart_upload:
->
(
request
)
{
{
key:
SecureRandom
.
uuid
}
end
}
}
```
In that case a
[
`Rack::Request`
]
object is also passed to the block. T
he
initial request to
`POST /s3/multipart`
will contain
`type`
and
`filename`
query parameters, so for example you could use that to make requesting the URL
later force a download with the original filename (using the
[
content_disposition
]
gem):
The initial request to
`POST /s3/multipart`
(which calls t
he
`#create_multipart_upload`
operation) will contain
`type`
and
`filename`
query
parameters, so for example you could use that to make requesting the URL later
force a download with the original filename (using the
[
content_disposition
]
gem):
```
rb
options:
{
create_multipart_upload:
->
(
request
)
do
create_multipart_upload:
->
(
request
)
{
filename
=
request
.
params
[
"filename"
]
{
content_disposition:
ContentDisposition
.
attachment
(
filename
)
}
end
}
}
```
...
...
@@ -335,7 +337,7 @@ require "uppy/s3_multipart/client"
client
=
Uppy
::
S3Multipart
::
Client
.
new
(
bucket:
bucket
)
```
#### `create_multipart_upload`
#### `
#
create_multipart_upload`
Initiates a new multipart upload.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment