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
2771054a
Commit
2771054a
authored
Mar 02, 2020
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add route for project imports direct upload via UI
parent
267ee92c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
internal/upstream/routes.go
internal/upstream/routes.go
+4
-0
upload_test.go
upload_test.go
+1
-0
No files found.
internal/upstream/routes.go
View file @
2771054a
...
...
@@ -50,6 +50,7 @@ const (
projectPattern
=
`^/([^/]+/){1,}[^/]+/`
snippetUploadPattern
=
`^/uploads/personal_snippet`
userUploadPattern
=
`^/uploads/user`
importPattern
=
`^/import/`
)
func
compileRegexp
(
regexpStr
string
)
*
regexp
.
Regexp
{
...
...
@@ -218,6 +219,9 @@ func (u *upstream) configureRoutes() {
route
(
"POST"
,
apiPattern
+
`v4/groups/import`
,
upload
.
Accelerate
(
api
,
signingProxy
)),
route
(
"POST"
,
apiPattern
+
`v4/projects/import`
,
upload
.
Accelerate
(
api
,
signingProxy
)),
// Project Import via UI upload acceleration
route
(
"POST"
,
importPattern
+
`gitlab_project`
,
upload
.
Accelerate
(
api
,
signingProxy
)),
// Explicitly proxy API requests
route
(
""
,
apiPattern
,
proxy
),
route
(
""
,
ciAPIPattern
,
proxy
),
...
...
upload_test.go
View file @
2771054a
...
...
@@ -138,6 +138,7 @@ func TestAcceleratedUpload(t *testing.T) {
{
"PUT"
,
"/api/v4/projects/9001/packages/nuget/v1/files"
,
true
},
{
"POST"
,
`/api/v4/groups/import`
,
true
},
{
"POST"
,
`/api/v4/projects/import`
,
true
},
{
"POST"
,
`/import/gitlab_project`
,
true
},
}
for
_
,
tt
:=
range
tests
{
...
...
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