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
e0e99018
Unverified
Commit
e0e99018
authored
May 28, 2019
by
Janko Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve style of the "POST /s3/multipart" route
parent
9500cdb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
app.rb
lib/uppy/s3_multipart/app.rb
+8
-9
No files found.
lib/uppy/s3_multipart/app.rb
View file @
e0e99018
...
@@ -38,17 +38,16 @@ module Uppy
...
@@ -38,17 +38,16 @@ module Uppy
route
do
|
r
|
route
do
|
r
|
# POST /s3/multipart
# POST /s3/multipart
r
.
post
[
""
,
true
]
do
r
.
post
[
""
,
true
]
do
content_type
=
r
.
params
[
"type"
]
type
=
r
.
params
[
"type"
]
filename
=
r
.
params
[
"filename"
]
filename
=
r
.
params
[
"filename"
]
extension
=
File
.
extname
(
filename
.
to_s
)
key
=
SecureRandom
.
hex
+
File
.
extname
(
filename
.
to_s
)
key
=
SecureRandom
.
hex
+
extension
key
=
[
*
opts
[
:prefix
],
key
].
join
(
"/"
)
key
=
"
#{
opts
[
:prefix
]
}
/
#{
key
}
"
if
opts
[
:prefix
]
content_disposition
=
ContentDisposition
.
inline
(
filename
)
if
filename
options
=
{}
options
[
:content_type
]
=
type
if
type
options
=
{
content_type:
content_type
,
content_disposition:
content_disposition
}
options
[
:content_disposition
]
=
ContentDisposition
.
inline
(
filename
)
if
filename
options
[
:acl
]
=
"public-read"
if
opts
[
:public
]
options
[
:acl
]
=
"public-read"
if
opts
[
:public
]
result
=
client_call
(
:create_multipart_upload
,
key:
key
,
**
options
)
result
=
client_call
(
:create_multipart_upload
,
key:
key
,
**
options
)
...
...
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