Modules

Calendar

Certificates

CollectiveAgreements

Company Forms

Company Forms Management

Contacts

Contracts

Customer Assets

Equipment

Expenses

Job Checklists

Job Invoices

Jobs

Labour Actions

Library

Locates

Materials

Messages

Purchase Orders

Safety

Schedule

Service Quotes/Invoices

Service Requests

Services

Settings

TimeLogs

Users

Other

UploadFile Resource


Endpoints

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:

  • id: (int) ID of the file record

Optional parameters:

  • sharing_on: (boolean) Whether the file is shared

Errors: Returns an array with a message if id is missing or invalid, or if you attempt to update a file you don't have permission to modify.

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

Properties

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

Settings

Setting
Pagination Limit (when page parameter is set) None
Default Sort Order By insertion order

Relationships

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