HTTP handlers for file upload and download operations.
Provides Ring-compatible handlers for file operations.
HTTP handlers for file upload and download operations. Provides Ring-compatible handlers for file operations.
(delete-file-handler storage-service)Handler for file deletion endpoint.
Path parameter:
Handler for file deletion endpoint. Path parameter: - file-key: Storage key of the file
(download-file-handler storage-service)Handler for file download endpoint.
Path parameter:
Handler for file download endpoint. Path parameter: - file-key: Storage key of the file
(get-file-url-handler storage-service)Handler for getting a file URL (direct or signed).
Path parameter:
Query parameter:
Handler for getting a file URL (direct or signed). Path parameter: - file-key: Storage key of the file Query parameter: - expiration: Expiration time in seconds (optional, default: 3600)
(storage-routes storage-service)(storage-routes storage-service {:keys [base-path] :or {base-path "/storage"}})Reitit route data for the storage endpoints, as this module's :api.
Versioning prepends /api/v1, so paths here carry no /api prefix.
Parameters:
Reitit route data for the storage endpoints, as this module's `:api`. Versioning prepends `/api/v1`, so paths here carry no `/api` prefix. Parameters: - storage-service: Instance of IStorageService - options: Map with optional :base-path (default: "/storage")
(upload-file-handler storage-service)Handler for file upload endpoint.
Expects multipart/form-data with:
Query parameters:
Handler for file upload endpoint. Expects multipart/form-data with: - file: The file to upload (required) - path: Storage path (optional) - visibility: 'public' or 'private' (optional, default: private) Query parameters: - max-size: Maximum file size in bytes - allowed-types: Comma-separated list of allowed MIME types - allowed-extensions: Comma-separated list of allowed extensions
(upload-image-handler storage-service)Handler for image upload endpoint with processing options.
Expects multipart/form-data with:
Handler for image upload endpoint with processing options. Expects multipart/form-data with: - file: The image file to upload (required) - path: Storage path (optional) - visibility: 'public' or 'private' (optional) - create-thumbnail: 'true' to create thumbnail (optional) - thumbnail-size: Thumbnail max dimension in pixels (optional, default: 200)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |