Generates a public, permanently-accessible URL for a file. Returns null if the file does not exist or public access is not supported by the adapter.
Readable execution context for the operation
The file identifier/path
The public URL or null if unavailable
Generates a temporary signed URL for downloading a file. The URL expires after the configured duration and becomes invalid. Returns null when the adapter verifies that the file does not exist. Some backends may return a signed URL that fails when accessed if existence checks are disabled.
Readable execution context for the operation
The file identifier/path
Configuration for the signed URL (expiration, content type, disposition)
The signed download URL, or null when the adapter verifies the file is unavailable
Generates a temporary signed URL for uploading a file. The URL expires after the configured duration and becomes invalid. Throws if URL generation fails (storage system misconfiguration).
Readable execution context for the operation
The file identifier/path where upload will be stored
Configuration for the signed URL (expiration, expected content type)
The signed upload URL (must always return a valid URL)
URL adapter contract for generating secure, temporary URLs for file access and uploads. Provides public URLs for direct access, signed URLs with expiration for download/upload operations. Abstract the URL generation logic, allowing different storage backends to implement URL strategies.
This adapter role separates concerns:
All methods operate on files via
keyidentifier and useIReadableContextfor audit logging.IMPORT_PATH:
"@daiso-tech/core/file-storage/contracts"