Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
c1473753
Commit
c1473753
authored
Oct 09, 2017
by
Greg Messner
Browse files
Fixed createFile() for V3 API (#82).
parent
a65eeeaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/RepositoryFileApi.java
View file @
c1473753
...
@@ -89,7 +89,7 @@ public class RepositoryFileApi extends AbstractApi {
...
@@ -89,7 +89,7 @@ public class RepositoryFileApi extends AbstractApi {
Form
formData
=
file2form
(
file
,
branchName
,
commitMessage
);
Form
formData
=
file2form
(
file
,
branchName
,
commitMessage
);
Response
response
;
Response
response
;
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
response
=
post
(
Response
.
Status
.
OK
,
formData
,
"projects"
,
projectId
,
"repository"
,
"files"
);
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
projectId
,
"repository"
,
"files"
);
}
else
{
}
else
{
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
projectId
,
"repository"
,
"files"
,
urlEncode
(
file
.
getFilePath
()));
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
projectId
,
"repository"
,
"files"
,
urlEncode
(
file
.
getFilePath
()));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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