You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// some endpoint scriptexportconstget=(event)=>{if(!permitted){return{status: 403,body: 'You do not have permission to access the file.'};}constfileStream=fs.createReadStream(filePath);return{body: fileStream};};
Logs
No response
System Info
Not important.
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I want to send large files via stream, but not working, so:
I saw here, looks supported,
response.body
also could beNodeJS.ReadableStream
:kit/packages/kit/src/node.js
Lines 83 to 91 in 143d17f
Then I checked implementation in
kit/src/runtime/server/endpoint.js
:kit/packages/kit/src/runtime/server/endpoint.js
Lines 96 to 101 in 143d17f
And
is_pojo
inkit/src/runtime/server/utils.js
:kit/packages/kit/src/runtime/server/utils.js
Lines 36 to 51 in 143d17f
Looks
response.body
could beNodeJS.ReadableStream
orReadableStream
, but no, because:kit/packages/kit/src/runtime/server/endpoint.js
Lines 87 to 91 in 143d17f
There will throw an error preventing me from using it.
Additional type check added currently:
Reproduction
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: