UploadFile Resource
| Endpoints | URI | Access Control | Description |
|---|---|---|---|
| save | POST /api/UploadFile/save |
Authentication only | Upload main file (and optional thumbnail) to ObjectStorage. Does not update DB. @param string $mainKey S3/key for the main file @param string $mainPath Local path to main file @param string|null $contentType Optional content type @param string|null $thumbKey Optional S3/key for thumbnail @param string|null $thumbPath Optional local path to thumbnail @return string The cloud path (main key) @throws RuntimeException on upload failure |
| 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 |