We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c46442 commit d9543c9Copy full SHA for d9543c9
qiita_client/qiita_client.py
@@ -841,9 +841,14 @@ def push_file_to_central(self, filepath):
841
elif self._plugincoupling == 'https':
842
logger.debug('Submitting file %s to qiita server.' % filepath)
843
844
+ # target path, i.e. without filename
845
+ dirpath = os.path.dirname(filepath)
846
+ if dirpath == "":
847
+ dirpath = "/"
848
+
849
self.post(
850
'/cloud/push_file_to_central/',
- files={os.path.dirname(filepath): open(filepath, 'rb')})
851
+ files={dirpath: open(filepath, 'rb')})
852
853
return filepath
854
0 commit comments