diff --git a/src/drive.ts b/src/drive.ts index 504720f..e440a22 100644 --- a/src/drive.ts +++ b/src/drive.ts @@ -375,11 +375,16 @@ export class FileSystemDrive implements Contents.IDrive { let format: Contents.FileFormat; let fileContent: any = null; - // We assume here image, audio and video mimetypes are all and only binary files we'll encounter + // We assume here image, audio, video, zip and pdf mimetypes are all and only binary files we'll encounter if ( file.type && - file.type.split('/') && - ['image', 'audio', 'video'].includes(file.type.split('/')[0]) + ((file.type.split('/') && + ['image', 'audio', 'video'].includes(file.type.split('/')[0])) || + [ + 'application/zip', + 'application/pdf', + 'application/octet-stream' + ].includes(file.type)) ) { format = 'base64'; } else {