Get Attachment
GET/api/upload/:tenant_id/attachment/:filename
Get an attachment by its filename.
This endpoint:
- Downloads attachment data from Backblaze using tenant-specific folder structure
- Returns the attachment as response
The endpoint supports authentication via:
- JWT authentication in cookies (web_context) - for browser requests
- JWT authentication in Authorization header (web_context) - for API requests
URL structure: /api/upload/{tenant_id}/attachment/{filename} Storage location: uploads/{tenant_id}/attachments/{filename}
Args: tenant_id: Tenant ID for folder isolation filename: The attachment filename (UUID with extension) request: FastAPI request object (used to read cookies) web_context: Optional web context from authentication
Returns: Attachment response with proper content type
Raises: 404: Attachment not found 400: Validation error 500: Internal server error
Request
Responses
- 200
- 422
Successful Response
Validation Error