From 5df009c7c7d378f6081401d832beded2bb0ff552 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 21 May 2025 19:29:12 +0530 Subject: [PATCH] Revert because of ERR_H2_OR_QUIC_REQUIRED Chrome throws ERR_H2_OR_QUIC_REQUIRED when we try to use a stream body on a non-TLS HTTP request. This will break both dev setups on localhost, and perhaps some self hosting setups, so is not a feasible path forward for an essential endpoint to the use of the app. --- web/packages/gallery/services/upload/remote.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/web/packages/gallery/services/upload/remote.ts b/web/packages/gallery/services/upload/remote.ts index 94a5df3bad..063511d224 100644 --- a/web/packages/gallery/services/upload/remote.ts +++ b/web/packages/gallery/services/upload/remote.ts @@ -271,21 +271,7 @@ export const putFilePart = async ( fetch(partUploadURL, { method: "PUT", headers: publicRequestHeaders(), - // @ts-expect-error See: [Note: duplex param required for stream body] - duplex: "half", - // Pipe the part data via a transform stream so that we can report progress. - body: new Response(partData).body!.pipeThrough( - new TransformStream({ - start() { - console.log("start"); - }, - transform(chunk, controller) { - console.log("chunk", chunk); - onProgress(chunk.length /* dummy value for now */); - controller.enqueue(chunk); - }, - }), - ), + body: partData, }), ); return nullToUndefined(res.headers.get("etag"));