file

Get file contents

Changed on

Downloads 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.

get/api/file/{DirName}/**

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/file/{DirName}/**
  • Auth
    none declared

Query parameters

tailinteger

Return the last N lines instead of the whole file

playboolean

When 1, set a playback-oriented content type instead of a forced attachment

attachboolean

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 query request parameter attach

    • info

      added the new optional query request parameter play

    • info

      added the new optional query request parameter tail

    • info

      added the media type application/octet-stream for the response with the status

    • info

      added the media type text/plain for the response with the status

    • breaking

      removed the media type application/octet-stream for the response with the status

    • breaking

      removed the media type text/plain for the response with the status

    • warning

      deleted the query request parameter attach

    • warning

      deleted the query request parameter play

    • warning

      deleted the query request parameter tail