code: def rooms_upload(self, rid, file, **kwargs):
          
          files = {
              'file': (os.path.basename(file), open(file, 'rb'), mimetypes.guess_type(file)[0]),
          }
          return self.__call_api_post('rooms.upload/' + rid, kwargs=kwargs, use_json=False, files=files)
docs: Post a message with attached file to a dedicated room.