diff options
| author | James Johnson <d0c.s4vage@gmail.com> | 2017-09-11 23:20:08 -0500 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-09-12 06:20:08 +0200 |
| commit | 29879d61d117ff7909302ed845a6a1eb13814365 (patch) | |
| tree | fafcb7f7003cc4b5a4146ea6090a76d9bf82082e /docs/gl_objects/projects.rst | |
| parent | fd40fce913fbb3cd0e3aa2fd042e20bf1d51e9d6 (diff) | |
| download | gitlab-29879d61d117ff7909302ed845a6a1eb13814365.tar.gz | |
adds project upload feature (#239)
Diffstat (limited to 'docs/gl_objects/projects.rst')
| -rw-r--r-- | docs/gl_objects/projects.rst | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst index 4a8a0ad..b6cf311 100644 --- a/docs/gl_objects/projects.rst +++ b/docs/gl_objects/projects.rst @@ -779,3 +779,51 @@ Delete a list: .. literalinclude:: projects.py :start-after: # board lists delete :end-before: # end board lists delete + + +File Uploads +============ + +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 + +Examples +-------- + +Upload a file into a project using a filesystem path: + +.. literalinclude:: projects.py + :start-after: # project file upload by path + :end-before: # end project file upload by path + +Upload a file into a project without a filesystem path: + +.. literalinclude:: projects.py + :start-after: # project file upload with data + :end-before: # end project file upload with data + +Upload a file and comment on an issue using the uploaded file's +markdown: + +.. literalinclude:: projects.py + :start-after: # project file upload markdown + :end-before: # end project file upload markdown + +Upload a file and comment on an issue while using custom +markdown to reference the uploaded file: + +.. literalinclude:: projects.py + :start-after: # project file upload markdown custom + :end-before: # end project file upload markdown custom |
