File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,23 +275,7 @@ class HostedImagesBindingImpl implements HostedImagesBinding {
275275 image : ReadableStream < Uint8Array > | ArrayBuffer ,
276276 options ?: ImageUploadOptions
277277 ) : Promise < ImageMetadata > {
278- let processedImage : ReadableStream < Uint8Array > | ArrayBuffer = image ;
279-
280- if ( options ?. encoding === 'base64' ) {
281- const stream =
282- image instanceof ReadableStream
283- ? image
284- : new ReadableStream ( {
285- start ( controller ) : void {
286- controller . enqueue ( new Uint8Array ( image ) ) ;
287- controller . close ( ) ;
288- } ,
289- } ) ;
290-
291- processedImage = stream . pipeThrough ( createBase64DecoderTransformStream ( ) ) ;
292- }
293-
294- return this . #fetcher. upload ( processedImage , options ) ;
278+ return this . #fetcher. upload ( image , options ) ;
295279 }
296280
297281 async update (
You can’t perform that action at this time.
0 commit comments