Skip to content

Commit 3188ad3

Browse files
authored
Merge pull request #43 from dataiku/feature/dss52-wiki-get-uploaded-file
Add get_uploaded_file to python client
2 parents 54c2673 + 29c9b3e commit 3188ad3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dataikuapi/dss/wiki.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,16 @@ def upload_attachement(self, fp, filename):
237237

238238
self.client._perform_json("POST", "/projects/%s/wiki/%s/upload" % (self.project_key, dku_quote_fn(self.article_id)), files={"file":(clean_filename, fp)})
239239

240+
def get_uploaded_file(self, upload_id):
241+
""""
242+
Download the attachement of an article
243+
244+
:param str upload_id: The attachement upload id
245+
:returns: The requests.Response object
246+
:rtype: :class:`requests.Response`
247+
"""
248+
return self.client._perform_raw("GET", "/projects/%s/wiki/%s/uploads/%s" % (self.project_key, self.article_id, upload_id))
249+
240250
def delete(self):
241251
"""
242252
Delete the article

0 commit comments

Comments
 (0)