We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle big (~1GB) file uploading? In node.js/express we do it like this:
var stream=fs.createWriteStream(...) stream.on("finish",()=>{ console.log("==>upload finished!") }) req.pipe(stream)
But how do this in Deno?
The text was updated successfully, but these errors were encountered:
The req.body property is a reader that can be used with Deno.copy to copy into a file:
req.body
Deno.copy
import { serve } from 'https://deno.land/std@0.54.0/http/server.ts'; const s = serve({ port: 8000 }); console.log('http://localhost:8000/'); for await (const req of s) { const file = await Deno.create('f.txt'); await Deno.copy(req.body, file); req.respond({ body: 'Hello World\n' }); }
Sorry, something went wrong.
As Luca wrote. Please reopen if that doesn't work for you.
No branches or pull requests
How to handle big (~1GB) file uploading? In node.js/express we do it like this:
But how do this in Deno?
The text was updated successfully, but these errors were encountered: