feat: add csv upload functionality for OSS (#29)

feat: add csv upload functionality
chore: remove redundant arq-worker from docker-compose
This commit is contained in:
Abhishek 2025-10-09 17:54:31 +05:30 committed by GitHub
parent 2633ff0a2a
commit 3babb5ced6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 941 additions and 234 deletions

View file

@ -33,13 +33,19 @@ class BaseFileSystem(ABC):
@abstractmethod
async def aget_signed_url(
self, file_path: str, expiration: int = 3600
self,
file_path: str,
expiration: int = 3600,
force_inline: bool = False,
use_internal_endpoint: bool = False,
) -> Optional[str]:
"""Generate a signed URL for temporary access to a file.
Args:
file_path: Path to the file
expiration: URL expiration time in seconds (default: 1 hour)
force_inline: Force inline display (browser preview vs download)
use_internal_endpoint: Use internal endpoint (for container-to-container access)
Returns:
Optional[str]: Signed URL if successful, None otherwise
@ -58,3 +64,24 @@ class BaseFileSystem(ABC):
Contains: size, created_at, modified_at, etag, etc.
"""
pass
@abstractmethod
async def aget_presigned_put_url(
self,
file_path: str,
expiration: int = 900,
content_type: str = "text/csv",
max_size: int = 10_485_760,
) -> Optional[str]:
"""Generate a presigned PUT URL for direct file upload.
Args:
file_path: Path where the file should be uploaded
expiration: URL expiration time in seconds (default: 15 minutes)
content_type: MIME type of the file (default: text/csv)
max_size: Maximum file size in bytes (default: 10MB)
Returns:
Optional[str]: Presigned PUT URL if successful, None otherwise
"""
pass