Riven
Riven
HHono
Created by Riven on 6/5/2024 in #help
ctx.req: readable stream
i think i have a solution:
const writeStream = createWriteStream(tarballPath);
const writableStream = new WritableStream({
write(chunk) {
writeStream.write(chunk);
},
close() {
writeStream.end();
},
abort(err) {
writeStream.destroy(err);
},
});

await ctx.req.raw.body!.pipeTo(writableStream);
const writeStream = createWriteStream(tarballPath);
const writableStream = new WritableStream({
write(chunk) {
writeStream.write(chunk);
},
close() {
writeStream.end();
},
abort(err) {
writeStream.destroy(err);
},
});

await ctx.req.raw.body!.pipeTo(writableStream);
would be nice to not require accessing the raw body though
3 replies
HHono
Created by Riven on 6/5/2024 in #help
ctx.req: readable stream
would like to access a ReadStream or be able to pipe a writable to the request
3 replies
DTDrizzle Team
Created by xxxxx on 5/3/2024 in #help
Create slug based on title field.
yeah, it's a derived value, so it shouldn't be in the client logic (ideally), in the same way that there's tools to manage createdAt/updatedAt
5 replies
DTDrizzle Team
Created by xxxxx on 5/3/2024 in #help
Create slug based on title field.
I am having this exact issue as well. Scoured the project; $default and $onUpdate don't pass any parameters
5 replies