This commit is contained in:
codey 2025-02-16 13:18:44 -05:00
parent a8014f286a
commit c39024ead1

View File

@ -22,6 +22,10 @@ http_headers: dict[str, str] = {
}
class CatboxAsync:
def __init__(self) -> None:
self.catbox_api_url = catbox_api_url
self.headers = http_headers
def generateRandomFileName(self, fileExt: Optional[str] = None) -> str:
"""
Generate random file name
@ -34,10 +38,6 @@ class CatboxAsync:
fileExt = 'png'
return f"{random.getrandbits(32)}.{fileExt}"
def __init__(self):
self.catbox_api_url = catbox_api_url
self.headers = http_headers
async def upload(self, file: str) -> Optional[str]:
"""
Upload file to catbox