File size: 686 Bytes
76b9762
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from typing import Union


class ImageMetadata:
    def __init__(self, width: int, height: int, filename: str, size: int, url: str, delete_url: Union[str, None] = None):
        self.width = width
        self.height = height
        self.filename = filename
        self.size = size
        self.url = url
        self.delete_url = delete_url
class UploadResponse:
    def __init__(self, success: bool, code: str, message: str, data: ImageMetadata):
        self.success = success
        self.code = code
        self.message = message
        self.data = data
class ImageUploader:
    def upload(self, file: bytes, filename: str) -> UploadResponse:
        raise NotImplementedError