File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export class GridFSBucketAdapter extends FilesAdapter {
8181 : null ;
8282
8383 // when working with a Blob, it could be over the max size of a buffer, so we need to stream it
84- if ( typeof Blob !== 'undefined' && data instanceof Blob ) {
84+ if ( data instanceof Blob ) {
8585 let readableStream = data . stream ( ) ;
8686
8787 // may come in as a web stream, so we need to convert it to a node stream
Original file line number Diff line number Diff line change @@ -178,11 +178,7 @@ export class FilesRouter {
178178
179179 let file ;
180180
181- if (
182- typeof Blob !== 'undefined' &&
183- Buffer . isBuffer ( req . body ) &&
184- req . body ?. length >= MAX_V8_STRING_SIZE_BYTES
185- ) {
181+ if ( Buffer . isBuffer ( req . body ) && req . body ?. length >= MAX_V8_STRING_SIZE_BYTES ) {
186182 file = new Parse . File ( filename , new Blob ( [ req . body ] ) , contentType ) ;
187183 } else {
188184 file = new Parse . File ( filename , { base64 : req . body . toString ( 'base64' ) } , contentType ) ;
@@ -229,7 +225,7 @@ export class FilesRouter {
229225 // update fileSize
230226 let fileData ;
231227 // if the file is a blob, get the size from the blob
232- if ( typeof Blob !== 'undefined' && fileObject . file . _source ?. file instanceof Blob ) {
228+ if ( fileObject . file . _source ?. file instanceof Blob ) {
233229 // get the size of the blob
234230 fileObject . fileSize = fileObject . file . _source . file . size ;
235231 // set the file data
You can’t perform that action at this time.
0 commit comments