so I need to download a file from S3 bucket and then, with either its buffer or readStream, append it to a FormData on node. I've tried different libraries such as formdata-node, isomorphic-form-data and form-data. Only formdata-node printed a FormData type on the log, while still having no values attached to it, and the others crashed as soon as I tried to instantiate a FormData.
const form = new FormData();
form.set("UsuarioInclusaoDR", body.UsuarioInclusaoDR);
form.set(
"TipoDocumentoDigitalizadoDR",
body.TipoDocumentoDigitalizadoDR
);
form.set(
"DescDocumentoDigitalizado",
body.DescDocumentoDigitalizado
);
form.set("TipoDocumento", fileType);
form.set("NomeDocumento", file.originalname);
form.set("Documento", {
name: file.originalname,
[Symbol.toStringTag]: "File",
stream() {
return s3Object;
},
});
I've tried removing the "Documento" form.set and it also didn't work. Any clues on what's impeding my FormData to get values set, or appended (i've tried both?)
Also, I'm really struggling trying to get a valid File from my S3 Buffer, is there any way to do that?
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
my nodejs module starts a server on a specific port, I am wondering if it is a way to stop the execution of that server in my mocha test:
I need to executemjs script about 200 times with another parameters (changableParametr):
I'm having an async problem, and I've followed a lot of articles online to try and get this issue fixed, but it hasn't done anything
Long story short, I'd like to reinstall nodejs on my windows systemHowever after I downloaded the msi file and ran it, it failed complaining about cannot find D drive