Add APIs to upload to various destinations - dummy code first
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from app.config import settings
|
||||
from app.tasks.retry_config import BaseTaskWithRetry
|
||||
from app.celery_app import celery
|
||||
|
||||
@celery.task(base=BaseTaskWithRetry)
|
||||
def upload_to_dropbox(file_path: str):
|
||||
"""Simulate uploading a file to Dropbox."""
|
||||
print(f"[INFO] Simulating upload to Dropbox: {file_path}")
|
||||
return {"status": "Completed", "file": file_path}
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from app.config import settings
|
||||
from app.tasks.retry_config import BaseTaskWithRetry
|
||||
from app.celery_app import celery
|
||||
|
||||
@celery.task(base=BaseTaskWithRetry)
|
||||
def upload_to_nextcloud(file_path: str):
|
||||
"""Simulate uploading a file to Nextcloud."""
|
||||
print(f"[INFO] Simulating upload to Nextcloud: {file_path}")
|
||||
return {"status": "Completed", "file": file_path}
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from app.config import settings
|
||||
from app.tasks.retry_config import BaseTaskWithRetry
|
||||
from app.celery_app import celery
|
||||
|
||||
@celery.task(base=BaseTaskWithRetry)
|
||||
def upload_to_paperless(file_path: str):
|
||||
"""Simulate uploading a file to Paperless."""
|
||||
print(f"[INFO] Simulating upload to Paperless: {file_path}")
|
||||
return {"status": "Completed", "file": file_path}
|
||||
Reference in New Issue
Block a user