Skip to main content

Get Image

GET 

/api/upload/:tenant_id/image/:filename

Get an image by its filename.

This endpoint:

  1. Downloads image data from Backblaze using tenant-specific folder structure
  2. Returns the image as response

The endpoint supports authentication via:

  1. JWT authentication in cookies (web_context) - for browser requests
  2. JWT authentication in Authorization header (web_context) - for API requests

URL structure: /api/upload/{tenant_id}/image/{filename} Storage location: uploads/{tenant_id}/images/{filename}

Args: tenant_id: Tenant ID for folder isolation filename: The image filename (UUID with extension) request: FastAPI request object (used to read cookies) web_context: Optional web context from authentication (cookies or header)

Returns: Image response with proper content type

Raises: 404: Image not found 400: Validation error 500: Internal server error

Request

Responses

Successful Response