Skip to main content

Overview

The File API provides an endpoint for viewing files that have been uploaded and stored in MileApp’s storage system. Files are typically uploaded as part of task execution (photos, signatures, documents) and can be retrieved using system-generated URLs.

API Endpoint

EndpointMethodDescription
/file/viewGETView/download a file by URL

How It Works

Files in MileApp are stored on cloud storage and accessed via system-generated URLs. When tasks contain photo, signature, or document components, the uploaded files are stored and a URL is generated.

File URL Format

https://apistorage.mile.app/{environment}/{orgId}/{year}/{month}/{day}/{timestamp}.{ext}
Example:
https://apistorage.mile.app/sandbox/6299add8/2024/03/20/1710920997.jpg

Supported File Types

The File API returns files with appropriate content types:
TypeContent-TypeExtensions
Imageimage/png, image/jpg, image/jpeg.png, .jpg, .jpeg

Usage

Retrieving a File

GET /file/view?url=https://apistorage.mile.app/sandbox/6299add8/2024/03/20/1710920997.jpg
The API will return the file content directly with the appropriate content type header.

Common Use Cases

  1. Displaying Task Photos - Retrieve photos captured during task execution
  2. Viewing Signatures - Display customer signatures collected in the field
  3. Document Access - Access documents attached to tasks
  • Task - Task management including file attachments
  • Flow - Configure photo and signature components