Skip to content

Commit

Permalink
[docs] update the file upload samples
Browse files Browse the repository at this point in the history
Closes #335
  • Loading branch information
Gauvain Pocentek committed Oct 8, 2017
1 parent 8764903 commit 72664c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/gl_objects/projects.py
Expand Up @@ -379,15 +379,15 @@
# end project file upload with data

# project file upload markdown
uploaded_file = project.upload_file("filename.txt", filedata="data")
uploaded_file = project.upload("filename.txt", filedata="data")
issue = project.issues.get(issue_id)
issue.notes.create({
"body": "See the attached file: {}".format(uploaded_file["markdown"])
})
# project file upload markdown

# project file upload markdown custom
uploaded_file = project.upload_file("filename.txt", filedata="data")
uploaded_file = project.upload("filename.txt", filedata="data")
issue = project.issues.get(issue_id)
issue.notes.create({
"body": "See the [attached file]({})".format(uploaded_file["url"])
Expand Down
4 changes: 1 addition & 3 deletions docs/gl_objects/projects.rst
Expand Up @@ -781,7 +781,7 @@ Delete a list:
:end-before: # end board lists delete


File Uploads
File uploads
============

Reference
Expand All @@ -790,12 +790,10 @@ Reference
* v4 API:

+ :attr:`gitlab.v4.objects.Project.upload`
+ :class:`gitlab.v4.objects.ProjectUpload`

* v3 API:

+ :attr:`gitlab.v3.objects.Project.upload`
+ :class:`gitlab.v3.objects.ProjectUpload`

* Gitlab API: https://docs.gitlab.com/ce/api/projects.html#upload-a-file

Expand Down

0 comments on commit 72664c4

Please sign in to comment.