UploadFile Resource
| Endpoints | URI | Access Control | Description |
|---|---|---|---|
| getFileContentFromRecord | GET /api/UploadFile/getFileContentFromRecord |
Endpoint level permissions | Get file content (and content-type) for serving. Uses disk or S3 when record has cloud_path. @param array $record Row from uploaded_files @param string $outputField 'filename' or 'thumb_filename' @return array|null ['content' => string, 'content_type' => string] or null |
| resolveLocalPathFromRecord | GET /api/UploadFile/resolveLocalPathFromRecord |
Endpoint level permissions | Resolve a local filesystem path for a file record. If the record is cloud-backed, this downloads it to a temp file and returns that path. @param array $record Row from uploaded_files @param string $outputField 'filename' or 'thumb_filename' @return string|false |
| cleanTempFile | GET /api/UploadFile/cleanTempFile |
Endpoint level permissions | Remove temp cached file created by resolveLocalPathFromRecord. Accepts the same record payload and output field. @param array $record Row from uploaded_files @param string $outputField 'filename' or 'thumb_filename' @return bool |
| save | POST /api/UploadFile/save |
Authentication only | |
| update | POST /api/UploadFile/update |
Endpoint level permissions |
Updates mutable metadata for an uploaded file. Use this to change sharing or other updatable options without re-uploading. Required parameters:
Optional parameters:
Errors: Returns an array with a message if |
| delete | POST /api/UploadFile/delete |
Authentication only | |
| find | GET /api/UploadFile/find |
Allowed with an active employment connection | |
| get | GET /api/UploadFile/get |
Admin or Module READ | |
| report | GET /api/UploadFile/report |
Endpoint level permissions | |
| save-batch | POST /api/UploadFile/save-batch |
Admin or Module WRITE |
| Property | Type | Description |
|---|---|---|
id |
number | |
type |
string | |
original_filename |
string | |
cloud_path |
string | |
filename |
string | |
thumb_filename |
string | |
width |
number | |
height |
number | |
thumb_max_size |
number | |
file_size_kb |
number | |
slug |
string | |
do_not_clean |
boolean | |
meta_json |
string | |
sharing_on |
boolean | |
created_at |
datetime | |
updated_at |
datetime | |
updated_by |
number |
| Setting | |
|---|---|
Pagination Limit (when page parameter is set) |
None |
| Default Sort Order | By insertion order |
| Related Resource | Key | Relationship to UploadFile | Property |
|---|---|---|---|
| User | updated_by |
Belongs To | UpdatedBy |
| JobFile | file_id |
Owns Many | JobFile |
| ServiceFile | file_id |
Owns Many | ServiceFile |