Get file contents
Changed onDownloads the specified file from a media directory. Crash and Diagnostic Reports (DirName Crashes) are for the user to download through FPP's UI (File Manager > Crash Reports); scripts and other API clients must not fetch them. The server cannot tell callers apart, so this is a rule for clients, not something it enforces.
Request
- Base URL/ (relative, and the document was published on a file host, not at the API’s origin)
- URL/api/file/{DirName}/**
- Authnone declared
Query parameters
Return the last N lines instead of the whole file
When 1, set a playback-oriented content type instead of a forced attachment
When 1, force attachment download for images
Response
File contents; content type varies by file extension and query params
Changes
- info
added the new optional
queryrequest parameterattach - info
added the new optional
queryrequest parameterplay - info
added the new optional
queryrequest parametertail - info
added the media type
application/octet-streamfor the response with the status - info
added the media type
text/plainfor the response with the status
- info
- breaking
removed the media type
application/octet-streamfor the response with the status - breaking
removed the media type
text/plainfor the response with the status - warning
deleted the
queryrequest parameterattach - warning
deleted the
queryrequest parameterplay - warning
deleted the
queryrequest parametertail
- breaking