Can't upload files with my bot

Hey there, I’m using rocketchat sdk in my nodejs project.
I’m trying to upload a file through my bot into a room with no success.
I see a very long log, which seems to be good after sending the message, but it doesn’t upload it.
Here is my code:

const uploadImage = async (path:string, rid:string) =>{
   const formData = new FormData();
   const stream = fs. createStream(path);
   formData.append('file', stream);
   await`rooms.upload/${rid}`, formData, true);