Closed onicolet closed 2 years ago
By looking at the source code, i found this
@param {String|null|undefined} encoding If null, the body is returned as a Buffer by default it is utf8.
So my final code is:
let fileFetched = await storage.objects().get(path, null);
res.set({
'Content-Type': documentMimeType,
'Content-Disposition': 'attachment; filename= documentName',
});
return new StreamableFile(Buffer.from(fileFetched.content));
Thanks, have a great day
Hi!
Awesome lib!
I'm just needing a bit of help with the object.get() function.
The response i'm getting is something like:
{ content: xxxxxxxxx headers: {.....} }
I'm having difficulties sending my file to my frontend... What format is content ? What should i do ? I'm using NestJs@8
Thanks in advance, and again, awesome work,
Vive la france