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
Dec 30, 2018
by
Janko Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
README tweaks
parent
3425d340
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:
...
@@ -264,32 +264,34 @@ parameters. The parameters can be provided statically:
```
rb
```
rb
options:
{
options:
{
create_multipart_upload:
{
cache_control:
"max-age=
#{
365
*
24
*
60
*
60
}
"
},
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
```
rb
options:
{
options:
{
create_multipart_upload:
->
(
request
)
do
create_multipart_upload:
->
(
request
)
{
{
key:
SecureRandom
.
uuid
}
{
key:
SecureRandom
.
uuid
}
end
}
}
}
```
```
In that case a
[
`Rack::Request`
]
object is also passed to the block. T
he
The initial request to
`POST /s3/multipart`
(which calls t
he
initial request to
`POST /s3/multipart`
will contain
`type`
and
`filename`
`#create_multipart_upload`
operation) will contain
`type`
and
`filename`
query
query parameters, so for example you could use that to make requesting the URL
parameters, so for example you could use that to make requesting the URL later
later force a download with the original filename (using the
force a download with the original filename (using the
[
content_disposition
]
[
content_disposition
]
gem):
gem):
```
rb
```
rb
options:
{
options:
{
create_multipart_upload:
->
(
request
)
do
create_multipart_upload:
->
(
request
)
{
filename
=
request
.
params
[
"filename"
]
filename
=
request
.
params
[
"filename"
]
{
content_disposition:
ContentDisposition
.
attachment
(
filename
)
}
{
content_disposition:
ContentDisposition
.
attachment
(
filename
)
}
end
}
}
}
```
```
...
@@ -335,7 +337,7 @@ require "uppy/s3_multipart/client"
...
@@ -335,7 +337,7 @@ require "uppy/s3_multipart/client"
client
=
Uppy
::
S3Multipart
::
Client
.
new
(
bucket:
bucket
)
client
=
Uppy
::
S3Multipart
::
Client
.
new
(
bucket:
bucket
)
```
```
#### `create_multipart_upload`
#### `
#
create_multipart_upload`
Initiates a new multipart upload.
Initiates a new multipart upload.
...
...
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