Reference documentation and code samples for the App Engine Admin V1 API class Google::Cloud::AppEngine::V1::StaticFilesHandler.
Files served directly to the user for a given URL, such as images, CSS
stylesheets, or JavaScript source files. Static file handlers describe which
files in the application directory are static files, and which URLs serve
them.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#application_readable
defapplication_readable()->::Boolean
Returns
(::Boolean) — Whether files should also be uploaded as code data. By default, files
declared in static file handlers are uploaded as static
data and are only served to end users; they cannot be read by the
application. If enabled, uploads are charged against both your code and
static data storage resource quotas.
#application_readable=
defapplication_readable=(value)->::Boolean
Parameter
value (::Boolean) — Whether files should also be uploaded as code data. By default, files
declared in static file handlers are uploaded as static
data and are only served to end users; they cannot be read by the
application. If enabled, uploads are charged against both your code and
static data storage resource quotas.
Returns
(::Boolean) — Whether files should also be uploaded as code data. By default, files
declared in static file handlers are uploaded as static
data and are only served to end users; they cannot be read by the
application. If enabled, uploads are charged against both your code and
static data storage resource quotas.
#expiration
defexpiration()->::Google::Protobuf::Duration
Returns
(::Google::Protobuf::Duration) — Time a static file served by this handler should be cached
by web proxies and browsers.
value (::Google::Protobuf::Map{::String => ::String}) — HTTP headers to use for all responses from these URLs.
Returns
(::Google::Protobuf::Map{::String => ::String}) — HTTP headers to use for all responses from these URLs.
#mime_type
defmime_type()->::String
Returns
(::String) — MIME type used to serve all files served by this handler.
Defaults to file-specific MIME types, which are derived from each file's
filename extension.
#mime_type=
defmime_type=(value)->::String
Parameter
value (::String) — MIME type used to serve all files served by this handler.
Defaults to file-specific MIME types, which are derived from each file's
filename extension.
Returns
(::String) — MIME type used to serve all files served by this handler.
Defaults to file-specific MIME types, which are derived from each file's
filename extension.
#path
defpath()->::String
Returns
(::String) — Path to the static files matched by the URL pattern, from the
application root directory. The path can refer to text matched in groupings
in the URL pattern.
#path=
defpath=(value)->::String
Parameter
value (::String) — Path to the static files matched by the URL pattern, from the
application root directory. The path can refer to text matched in groupings
in the URL pattern.
Returns
(::String) — Path to the static files matched by the URL pattern, from the
application root directory. The path can refer to text matched in groupings
in the URL pattern.
#require_matching_file
defrequire_matching_file()->::Boolean
Returns
(::Boolean) — Whether this handler should match the request if the file
referenced by the handler does not exist.
#require_matching_file=
defrequire_matching_file=(value)->::Boolean
Parameter
value (::Boolean) — Whether this handler should match the request if the file
referenced by the handler does not exist.
Returns
(::Boolean) — Whether this handler should match the request if the file
referenced by the handler does not exist.
#upload_path_regex
defupload_path_regex()->::String
Returns
(::String) — Regular expression that matches the file paths for all files that should be
referenced by this handler.
#upload_path_regex=
defupload_path_regex=(value)->::String
Parameter
value (::String) — Regular expression that matches the file paths for all files that should be
referenced by this handler.
Returns
(::String) — Regular expression that matches the file paths for all files that should be
referenced by this handler.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# App Engine Admin V1 API - Class Google::Cloud::AppEngine::V1::StaticFilesHandler (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-app_engine-v1/latest/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [1.2.1](/ruby/docs/reference/google-cloud-app_engine-v1/1.2.1/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [1.1.0](/ruby/docs/reference/google-cloud-app_engine-v1/1.1.0/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [1.0.1](/ruby/docs/reference/google-cloud-app_engine-v1/1.0.1/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.10.0](/ruby/docs/reference/google-cloud-app_engine-v1/0.10.0/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.9.2](/ruby/docs/reference/google-cloud-app_engine-v1/0.9.2/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.8.0](/ruby/docs/reference/google-cloud-app_engine-v1/0.8.0/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.7.0](/ruby/docs/reference/google-cloud-app_engine-v1/0.7.0/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.6.1](/ruby/docs/reference/google-cloud-app_engine-v1/0.6.1/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.5.0](/ruby/docs/reference/google-cloud-app_engine-v1/0.5.0/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.4.0](/ruby/docs/reference/google-cloud-app_engine-v1/0.4.0/Google-Cloud-AppEngine-V1-StaticFilesHandler)\n- [0.3.6](/ruby/docs/reference/google-cloud-app_engine-v1/0.3.6/Google-Cloud-AppEngine-V1-StaticFilesHandler) \nReference documentation and code samples for the App Engine Admin V1 API class Google::Cloud::AppEngine::V1::StaticFilesHandler.\n\nFiles served directly to the user for a given URL, such as images, CSS\nstylesheets, or JavaScript source files. Static file handlers describe which\nfiles in the application directory are static files, and which URLs serve\nthem. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #application_readable\n\n def application_readable() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.\n\n### #application_readable=\n\n def application_readable=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas. \n**Returns**\n\n- (::Boolean) --- Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.\n\n### #expiration\n\n def expiration() -\u003e ::Google::Protobuf::Duration\n\n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Time a static file served by this handler should be cached by web proxies and browsers.\n\n### #expiration=\n\n def expiration=(value) -\u003e ::Google::Protobuf::Duration\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Time a static file served by this handler should be cached by web proxies and browsers. \n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Time a static file served by this handler should be cached by web proxies and browsers.\n\n### #http_headers\n\n def http_headers() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- HTTP headers to use for all responses from these URLs.\n\n### #http_headers=\n\n def http_headers=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- HTTP headers to use for all responses from these URLs. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- HTTP headers to use for all responses from these URLs.\n\n### #mime_type\n\n def mime_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- MIME type used to serve all files served by this handler.\n\n Defaults to file-specific MIME types, which are derived from each file's\n filename extension.\n\n### #mime_type=\n\n def mime_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- MIME type used to serve all files served by this handler.\n\n\n Defaults to file-specific MIME types, which are derived from each file's\nfilename extension. \n**Returns**\n\n- (::String) --- MIME type used to serve all files served by this handler.\n\n Defaults to file-specific MIME types, which are derived from each file's\n filename extension.\n\n### #path\n\n def path() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.\n\n### #path=\n\n def path=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern. \n**Returns**\n\n- (::String) --- Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.\n\n### #require_matching_file\n\n def require_matching_file() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Whether this handler should match the request if the file referenced by the handler does not exist.\n\n### #require_matching_file=\n\n def require_matching_file=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Whether this handler should match the request if the file referenced by the handler does not exist. \n**Returns**\n\n- (::Boolean) --- Whether this handler should match the request if the file referenced by the handler does not exist.\n\n### #upload_path_regex\n\n def upload_path_regex() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Regular expression that matches the file paths for all files that should be referenced by this handler.\n\n### #upload_path_regex=\n\n def upload_path_regex=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Regular expression that matches the file paths for all files that should be referenced by this handler. \n**Returns**\n\n- (::String) --- Regular expression that matches the file paths for all files that should be referenced by this handler."]]