22 lines
		
	
	
		
			422 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			422 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from abc import abstractmethod
 | 
						|
 | 
						|
from fastapi import UploadFile
 | 
						|
 | 
						|
 | 
						|
class BaseImagesUploader:
 | 
						|
 | 
						|
    @abstractmethod
 | 
						|
    def get_url(self, filename: str) -> bytes:
 | 
						|
        pass
 | 
						|
 | 
						|
    @abstractmethod
 | 
						|
    def get_abs_path(self, filename: str) -> bytes:
 | 
						|
        pass
 | 
						|
 | 
						|
    @abstractmethod
 | 
						|
    def delete(self, filename: str):
 | 
						|
        pass
 | 
						|
 | 
						|
    @abstractmethod
 | 
						|
    async def upload(self, upload_file: UploadFile) -> str:
 | 
						|
        pass |