mirror of
https://github.com/akkuman/gitea-release-action.git
synced 2026-03-26 13:00:48 +00:00
fix: autoclose stream
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -48271,7 +48271,7 @@ async function createStreamableFile(fpath) {
|
|||||||
const { size } = await handle.stat();
|
const { size } = await handle.stat();
|
||||||
|
|
||||||
const file = new external_buffer_.File([], name);
|
const file = new external_buffer_.File([], name);
|
||||||
file.stream = () => handle.readableWebStream();
|
file.stream = () => handle.readableWebStream({autoClose: true});
|
||||||
|
|
||||||
// Set correct size otherwise, fetch will encounter UND_ERR_REQ_CONTENT_LENGTH_MISMATCH
|
// Set correct size otherwise, fetch will encounter UND_ERR_REQ_CONTENT_LENGTH_MISMATCH
|
||||||
Object.defineProperty(file, 'size', { get: () => size });
|
Object.defineProperty(file, 'size', { get: () => size });
|
||||||
|
|||||||
2
main.js
2
main.js
@@ -133,7 +133,7 @@ async function createStreamableFile(fpath) {
|
|||||||
const { size } = await handle.stat();
|
const { size } = await handle.stat();
|
||||||
|
|
||||||
const file = new File([], name);
|
const file = new File([], name);
|
||||||
file.stream = () => handle.readableWebStream();
|
file.stream = () => handle.readableWebStream({autoClose: true});
|
||||||
|
|
||||||
// Set correct size otherwise, fetch will encounter UND_ERR_REQ_CONTENT_LENGTH_MISMATCH
|
// Set correct size otherwise, fetch will encounter UND_ERR_REQ_CONTENT_LENGTH_MISMATCH
|
||||||
Object.defineProperty(file, 'size', { get: () => size });
|
Object.defineProperty(file, 'size', { get: () => size });
|
||||||
|
|||||||
Reference in New Issue
Block a user