summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
authorRavan Scafi <rscafi@leroymerlin.com.br>2019-08-14 16:31:55 -0300
committerRavan Scafi <rscafi@leroymerlin.com.br>2019-08-14 17:12:11 -0300
commit558ace9b007ff9917734619c05a7c66008a4c3f0 (patch)
treee8a31231793f53e8e9fb6e4dd1ec31f2e7153e33 /docs/gl_objects
parente8a3585ed0e7dfa2f64f6c3378a598120f5f8167 (diff)
downloadgitlab-558ace9b007ff9917734619c05a7c66008a4c3f0.tar.gz
fix(projects): avatar uploading for projects
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/projects.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index 9e90c9b..f7bb4b3 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -84,6 +84,13 @@ Update a project::
project.snippets_enabled = 1
project.save()
+Set the avatar image for a project::
+
+ # the avatar image can be passed as data (content of the file) or as a file
+ # object opened in binary mode
+ project.avatar = open('path/to/file.png', 'rb')
+ project.save()
+
Delete a project::
gl.projects.delete(project_id)