Skip to content

Commit 334ba37

Browse files
committed
Initial commit
1 parent 0819fd7 commit 334ba37

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

appwrite/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ def set_project(self, value):
2828
self._global_headers['x-appwrite-project'] = value.lower()
2929
return self
3030

31-
def set_key(self, value):
32-
"""Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard."""
33-
34-
self._global_headers['x-appwrite-key'] = value.lower()
35-
return self
36-
3731
def set_locale(self, value):
3832
self._global_headers['x-appwrite-locale'] = value.lower()
3933
return self
@@ -42,6 +36,12 @@ def set_mode(self, value):
4236
self._global_headers['x-appwrite-mode'] = value.lower()
4337
return self
4438

39+
def set_key(self, value):
40+
"""Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard."""
41+
42+
self._global_headers['x-appwrite-key'] = value.lower()
43+
return self
44+
4545
def call(self, method, path='', headers=None, params=None):
4646
if headers is None:
4747
headers = {}

appwrite/services/storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create_file(self, files, readstring(4) ""[]""
2929
params['folderId'] = folder_id
3030

3131
return self.client.call('post', path, {
32-
'content-type': 'Array',
32+
'content-type': 'multipart/form-data',
3333
}, params)
3434

3535
def get_file(self, file_id):

0 commit comments

Comments
 (0)