def METHOD_NAME(self, pyfile):
    json_data = self.api_request(
        "file/info",
        sid=self.account.info["data"]["sid"],
        url=pyfile.url
    )
    self.info["md5"] = json_data["hash"]
    pyfile.name = json_data["filename"]
    pyfile.size = json_data["size"]
    json_data = self.api_request(
        "file/download",
        sid=self.account.info["data"]["sid"],
        url=pyfile.url
    )
    self.link = json_data["url"]