Skip to content

Commit 72664c4

Browse files
author
Gauvain Pocentek
committed
[docs] update the file upload samples
Closes #335
1 parent 8764903 commit 72664c4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/gl_objects/projects.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,15 @@
379379
# end project file upload with data
380380

381381
# project file upload markdown
382-
uploaded_file = project.upload_file("filename.txt", filedata="data")
382+
uploaded_file = project.upload("filename.txt", filedata="data")
383383
issue = project.issues.get(issue_id)
384384
issue.notes.create({
385385
"body": "See the attached file: {}".format(uploaded_file["markdown"])
386386
})
387387
# project file upload markdown
388388

389389
# project file upload markdown custom
390-
uploaded_file = project.upload_file("filename.txt", filedata="data")
390+
uploaded_file = project.upload("filename.txt", filedata="data")
391391
issue = project.issues.get(issue_id)
392392
issue.notes.create({
393393
"body": "See the [attached file]({})".format(uploaded_file["url"])

docs/gl_objects/projects.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ Delete a list:
781781
:end-before: # end board lists delete
782782

783783

784-
File Uploads
784+
File uploads
785785
============
786786

787787
Reference
@@ -790,12 +790,10 @@ Reference
790790
* v4 API:
791791

792792
+ :attr:`gitlab.v4.objects.Project.upload`
793-
+ :class:`gitlab.v4.objects.ProjectUpload`
794793

795794
* v3 API:
796795

797796
+ :attr:`gitlab.v3.objects.Project.upload`
798-
+ :class:`gitlab.v3.objects.ProjectUpload`
799797

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

0 commit comments

Comments
 (0)