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.
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user