Skip to main content

Retrieve file from S3

GET 

/truckers/files/

Retrieves a file stored in Amazon S3.

This endpoint allows you to retrieve generic files (PDFs, images, binaries) previously uploaded to the system. It requires JWT authentication and the exact name of the file to be retrieved.

Use Cases:

  • Download PDF documents such as invoices or contracts
  • View profile pictures or scanned documents
  • Retrieve specific binary files

Example:

GET /?file=factura_12345.pdf

Request

Responses

File successfully retrieved from S3.

The returned content varies depending on the requested file type:

  • PDF: application/pdf
  • Images: image/jpeg or image/png
  • Other types: application/octet-stream

Successful response example:

HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename=invoice_12345.pdf

[binary data]