Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
02bf9bd0
Commit
02bf9bd0
authored
Sep 05, 2019
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accelerate wiki attachments
parent
6ca9bc1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
internal/upstream/routes.go
internal/upstream/routes.go
+5
-0
upload_test.go
upload_test.go
+1
-1
No files found.
internal/upstream/routes.go
View file @
02bf9bd0
...
...
@@ -202,6 +202,11 @@ func (u *upstream) configureRoutes() {
// Maven Artifact Repository
route
(
"PUT"
,
apiPattern
+
`v4/projects/[0-9]+/packages/maven/`
,
filestore
.
BodyUploader
(
api
,
proxy
,
nil
)),
// We are porting API to disk acceleration
// we need to declare each routes until we have fixed all the routes on the rails codebase.
// Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status
route
(
"POST"
,
apiPattern
+
`v4/projects/[0-9]+/wikis/attachments\z`
,
uploadAccelerateProxy
),
// Explicitly proxy API requests
route
(
""
,
apiPattern
,
proxy
),
route
(
""
,
ciAPIPattern
,
proxy
),
...
...
upload_test.go
View file @
02bf9bd0
...
...
@@ -116,7 +116,7 @@ func TestAcceleratedUpload(t *testing.T) {
ws
:=
startWorkhorseServer
(
ts
.
URL
)
defer
ws
.
Close
()
resources
:=
[]
string
{
`/example`
,
`/uploads/personal_snippet`
,
`/uploads/user`
}
resources
:=
[]
string
{
`/example`
,
`/uploads/personal_snippet`
,
`/uploads/user`
,
`/api/v4/projects/1/wikis/attachments`
}
for
_
,
resource
:=
range
resources
{
reqBody
,
contentType
,
err
:=
multipartBodyWithFile
()
require
.
NoError
(
t
,
err
)
...
...
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