/v1/files/readFile/:filepathOrIdpostPath parameters for identifying a file by either filepath or file ID
| Field | Type | Required | Description |
|---|---|---|---|
filepathOrId | string | No | File path with workspace rootname (case insensitive) or file ID for flexible file identification Example: /workspace-rootname/folder/file.ext |
HTTP request headers for POST file read operations
| Field | Type | Required | Description |
|---|---|---|---|
Range | string | No | HTTP Range header specifying byte range(s) to request Example: bytes=0-499 |
If-Range | string | No | HTTP If-Range header value (ETag or Last-Modified date) for conditional range requests Example: "etag-value" |
Content-Type | string | Yes | HTTP JSON request content type Example: application/json |
Authorization | string | No | Access token Example: Bearer <token> |
Query parameters for the read file HTTP endpoint
| Field | Type | Required | Description |
|---|---|---|---|
w | number | No | Resize to width if file is an image Number subset: Example: 600 |
h | number | No | Resize to height if file is an image Number subset: Example: 400 |
pos | string or number | No | Position or gravity to use when fit is cover or contain Gravity or strategy to use when fit is cover or contain Enum: Example: center Position to use when fit is cover or contain Number subset: Example: 5 |
fit | string | No | How the image should be resized to fit provided dimensions Enum: Example: cover |
bg | string | No | Hex background color to use when fit is contain Example: #FFFFFF |
withoutEnlargement | boolean | No | Do not enlarge if the width or height are already less than provided dimensions Example: |
format | string | No | Format to transform image to if file is an image Enum: Example: webp |
download | boolean | No | Whether the server should add "Content-Disposition: attachment" header which forces browsers to download files like HTML, JPEG, etc. which it'll otherwise open in the browser |
Parameters for reading/downloading a file with optional image processing
Parameters for resizing images on-the-fly during file retrieval
Byte range with start and end positions
HTTP response headers for file read operations
| Field | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | Get file endpoint result content type. If request is successful, it will be the file's content type if it is known or application/octet-stream otherwise, and application/json containing errors if request fails Example: image/jpeg |
Content-Length | string | Yes | HTTP response content length in bytes Example: 1024 |
Content-Disposition | string | No | HTTP response content disposition Example: attachment; filename="file.txt" |
Accept-Ranges | string | No | Indicates that the server supports range requests Example: bytes |
Last-Modified | string | No | Date and time when the file was last modified Example: Wed, 21 Oct 2015 07:28:00 GMT |
ETag | string | No | Entity tag for cache validation Example: "a1b2c3d4e5f6789012345678901234ab" |
Content-Range | string | No | Indicates where in the full body message a partial message belongs Example: bytes 0-499/1024 |
binary| Field | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | HTTP JSON response content type Example: application/json |
Content-Length | string | Yes | HTTP response content length in bytes |