Skip to main content

Delete Mms Attachment

DELETE 

/api/upload/mms/:filename

Delete an MMS attachment from both Backblaze and Redis.

This endpoint cleans up both storage locations:

  1. Backblaze B2 (permanent storage)
  2. Redis (temporary public URL)

Smart detection: If filename is a UUID without extension (e.g., from frontend extracting last segment of /api/public/temp-image/{redis_key}), it will be treated as the redis_key and only Redis will be cleaned.

Args: filename: The Backblaze filename to delete (or redis_key if no extension) redis_key: Optional Redis image key (if not provided, auto-detected from filename) upload_service: Upload service instance with tenant context

Returns: Success message with cleanup details

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

Request

Responses

Successful Response