Skip to content

Commit fff9f73

Browse files
author
Célian Haydont
committed
provide path to put_file to write in subfolder
1 parent 83e9ef4 commit fff9f73

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

dataikuapi/dss/managedfolder.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,17 @@ def delete_file(self, path):
9090
return self.client._perform_empty(
9191
"DELETE", "/projects/%s/managedfolders/%s/contents/%s" % (self.project_key, self.odb_id, path))
9292

93-
def put_file(self, name, f):
93+
def put_file(self, path, f):
9494
"""
95-
Upload the file to the managed folder
95+
Upload a file to the managed folder
9696
9797
Args:
9898
f: the file contents, as a stream
99-
name: the name of the file
99+
path: the path of the file
100100
"""
101-
102101
return self.client._perform_json_upload(
103-
"POST", "/projects/%s/managedfolders/%s/contents/" % (self.project_key, self.odb_id),
104-
name, f)
102+
"POST", "/projects/%s/managedfolders/%s/contents/%s" % (self.project_key, self.odb_id, path),
103+
path, f)
105104

106105
########################################################
107106
# Managed folder actions

0 commit comments

Comments
 (0)