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
7e106311
Unverified
Commit
7e106311
authored
Feb 03, 2020
by
Janko Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an empty OPTIONS route
Uppy makes requests to the OPTIONS route before the upload, so we add a handler that just returns a successful response. Fixes #12
parent
fc55fac9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app.rb
lib/uppy/s3_multipart/app.rb
+5
-0
app_test.rb
test/app_test.rb
+10
-0
No files found.
lib/uppy/s3_multipart/app.rb
View file @
7e106311
...
...
@@ -54,6 +54,11 @@ module Uppy
{
uploadId:
result
.
fetch
(
:upload_id
),
key:
result
.
fetch
(
:key
)
}
end
# OPTIONS /s3/multipart
r
.
options
[
""
,
true
]
do
r
.
halt
204
end
# GET /s3/multipart/:uploadId
r
.
get
String
do
|
upload_id
|
key
=
param!
(
"key"
)
...
...
test/app_test.rb
View file @
7e106311
...
...
@@ -110,6 +110,16 @@ describe Uppy::S3Multipart::App do
end
end
describe
"OPTIONS /s3/multipart"
do
it
"returns an empty response"
do
response
=
app
.
options
"/s3/multipart"
assert_equal
204
,
response
.
status
assert_equal
Hash
.
new
,
response
.
headers
assert_equal
""
,
response
.
body_binary
end
end
describe
"GET /s3/multipart/:uploadId"
do
it
"fetches multipart parts"
do
response
=
app
.
get
"/s3/multipart/foo"
,
query:
{
key:
"bar"
}
...
...
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