Skip to content

Commit 106933d

Browse files
authored
Merge pull request #104 from DenisaCG/fix_upload
Fix upload functionality
2 parents a464951 + 7dedaa1 commit 106933d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_drives/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ async def save_file(self, drive_name, path, content, options_format, content_for
487487
if options_format == 'json':
488488
formatted_content = json.dumps(content, indent=2)
489489
formatted_content = formatted_content.encode("utf-8")
490-
elif options_format == 'base64' and (content_format == 'base64' or content_type == 'PDF' or content_type == 'notebook'):
490+
elif options_format == 'base64' and (content_format == 'base64' or (content_format == 'text' and content_type != 'PDF') or content_type == 'PDF' or content_type == 'notebook'):
491491
# transform base64 encoding to a UTF-8 byte array for saving or storing
492492
byte_characters = base64.b64decode(content)
493493

0 commit comments

Comments
 (0)