in my node application I want to use FormData to upload a remote image. To do this I'm trying the following
const form = new FormData();
...
const result = await fetch(image);
form.append("file", result.body);
...
This is generating the following error:
TypeError: source.on is not a function
I'm wondering what I have to pass to form.append
to make it work. I tried also using result.blob()
without any luck. Any help appreciated.