Skip to content

Commit 5eb0423

Browse files
authored
Merge branch 'main' into chunk_upload
2 parents 9f66d79 + 106933d commit 5eb0423

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_drives/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,13 @@ async def save_file(self, drive_name, path, content, options_format, content_for
488488
if options_format == 'json':
489489
formatted_content = json.dumps(content, indent=2)
490490
formatted_content = formatted_content.encode("utf-8")
491-
491+
492492
if options_chunk:
493493
if options_chunk == 1:
494494
self._multipartUploads[path] = '';
495495

496496
self._multipartUploads[path] = json.dumps(self._multipartUploads[path] + formatted_content,indent = 2);
497-
elif options_format == 'base64' and (content_format == 'base64' or content_type == 'PDF' or content_type == 'notebook'):
497+
elif options_format == 'base64' and (content_format == 'base64' or (content_format == 'text' and content_type != 'PDF') or content_type == 'PDF' or content_type == 'notebook'):
498498
# transform base64 encoding to a UTF-8 byte array for saving or storing
499499
byte_characters = base64.b64decode(content)
500500

0 commit comments

Comments
 (0)