Can anyone assist me in figuring out how to add a file of type Express.Multer.File into a FormData object?
Situation: I have received a file with the type Express.Multer.File (I am using nestjs and followed this part of the documentation: https://docs.nestjs.com/techniques/file-upload). I need to place it in a FormData object to send it to another API.
I attempted form.append('randomword', file); however, I am encountering the error:
TypeError: source.on is not a function
at Function.DelayedStream.create (xxx/delayed-stream/lib/delayed_stream.js:33:10)
at FormData.CombinedStream.append (xxx/combined-stream/lib/combined_stream.js:45:37)
...
I understand that I may be approaching this incorrectly, but I am unsure of the correct method. Any guidance would be greatly appreciated!