Packets
Create file download URL
Creates a presigned download URL and returns file metadata for client-side HTTP download.
Create file download URL creates a short-lived download URL for a file in the current
application. The file bytes are downloaded by client over HTTP using the
returned presigned_url.
Request
Create file download URL uses packet type = 7.
{
"type": 7,
"id": 8,
"filename": "client.dll",
"resume_at": 0
}Prop
Type
Response
{
"id": 8,
"presigned_url": "https://cdn.example.net/...",
"file_size": 1832456,
"file_checksum": "2f57f0f6f4f8f7df8f4f395f6efc58f3e0681c6cf8f8a53fd2f1f4d76ab4bc9e",
"status": 1
}Prop
Type
Client download flow
Send websocket Create file download URL packet and wait for status.
If status = Ok, send HTTP GET request to presigned_url.
If resume_at > 0, include HTTP header Range: bytes=<resume_at>-.
Validate downloaded bytes against checksum policy in your client library.
Checksum notes
file_checksumalways represents the full stored file.- If download starts from byte
0, client can compare full-file checksum directly. - If resumed (
resume_at > 0), checksum validation strategy depends on your client implementation. FileChecksumMismatchbelongs to client-side download validation and is not returned by this websocket packet.
Create-file-download-url statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | Presigned URL and metadata were created successfully. |
3 | NotAuthorized | Session is not authorized for this operation. |
6 | InternalServerError | Server failed due to an internal error. |
300 | FileNotFound | Requested file was not found. |
303 | FileInvalidResumeOffset | resume_at is negative or greater than or equal to file size. |
Connection-close cases (before/around this usecase)
Create file download URL itself returns regular JSON responses, but session can still be
closed by protocol/session guards:
| Close code | Error | When it happens |
|---|---|---|
4200 | connection is not initialized | Request was sent before successful Initialize. |
4201 | rate limit hit or rate limited, N seconds left | Client IP hit the websocket rate limit, or is still waiting for the temporary block to expire. |
4302 | invalid request body | Packet body does not match the required schema for this operation. |
4304 | received unsupported data | Client sent unsupported frame type (request packets must be text JSON). |