Endpoint
This endpoint accepts file uploads and creates a secure download link with optional expiration, view limits, and password protection.
Content Type
Form Parameters
The file to upload. This becomes the download target for the secure link.Validation:
- Required field
- Must be a valid file upload
- File is stored on the server filesystem
- Files are stored with unique identifiers
- Original filename is preserved in metadata
- File path is used as the link target
ISO 8601 timestamp indicating when the download link should expire.Validation:
- Must be a future date/time
- Format:
YYYY-MM-DDTHH:mm:ss±HH:mm(ISO 8601 with timezone) - If not provided, the link will not have time-based expiration
2026-12-31T23:59:59+00:00Maximum number of times the file can be downloaded before the link becomes invalid.Validation:
- Must be a positive integer (> 0)
- If not provided, the link will not have view-based expiration
10Optional password required to download the file. When set, clients must provide this password via the
X-Link-Password header when accessing the download link.Security:- Stored as a bcrypt hash
- Required via HTTP header on file download
- No length restrictions (recommended: 8+ characters)
filePassword123Response
Unique identifier for the created download link. This code is used in the access URL.Format: 8-character alphanumeric stringExample:
F5gH7jKlThe full URL path to download the file.Format:
/l/{shortCode}Example: http://localhost:8080/l/F5gH7jKlISO 8601 timestamp when the download link expires (if expiration was set).Format:
YYYY-MM-DDTHH:mm:ss±HH:mmExample: 2026-12-31T23:59:59+00:00Maximum number of downloads allowed (if view limit was set).Example:
10Status Codes
File uploaded successfully and download link created. Response body contains the link details.
Request validation failed. Possible causes:
- Missing or invalid file upload
expiresAtis not a future datemaxViewsis not a positive integer- Invalid multipart/form-data format
timestamp: When the error occurredstatus: HTTP status code (400)error: “Bad Request”message: Specific validation errorpath: Request path that caused the error
Unexpected server error occurred (e.g., file storage failure).Error response includes:
timestamp: When the error occurredstatus: HTTP status code (500)error: “Internal Server Error”message: Generic error message with reference ID for troubleshootingpath: Request path that caused the error
Examples
Basic File Upload
Upload with Expiration
Upload with Download Limit
Fully Protected Upload
The password is not returned in the response. Users must provide it via the
X-Link-Password header when downloading the file.Accessing the Uploaded File
Once uploaded, users can download the file by accessing theaccessUrl (see Resolve Link):
- File download with original filename
Content-Disposition: attachment; filename="original-name.pdf"Content-Type: application/octet-stream
Validation Error Example
Request without file:Important Notes
Link Type: Upload links create
DOWNLOAD type secure links (as opposed to REDIRECT type). When accessed, they return the file content instead of redirecting.Original Filename: The original filename is preserved and returned in the
Content-Disposition header when the file is downloaded.Related Endpoints
Create Link
Create a redirect link to an external URL
Resolve Link
Download a file using its short code
Revoke Link
Permanently disable a download link
