class FileHandler

Ruby on Rails 5.2.8.1

Since v3.1.12

Available in: v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

This middleware returns a file’s contents from disk in the body response. When initialized, it can accept optional HTTP headers, which will be set when a response containing a file’s contents is delivered.

This middleware will render the file specified in env["PATH_INFO"] where the base path is in the root directory. For example, if the root is set to public/, then a request with env["PATH_INFO"] of assets/application.js will return a response with the contents of a file located at public/assets/application.js if the file exists. If the file does not exist, a 404 “File not Found” response will be returned.

Inherits from

Object

Methods (defined here)

Private methods

(4) Implementation detail — not part of the public API.

Methods (inherited)

From Object (17)

Type at least 2 characters to search.

↑↓ navigate · open · esc close