Class FileResourceConstants
java.lang.Object
com.inductiveautomation.ignition.common.fileresources.FileResourceConstants
Constants for the platform-level file resources feature. See RFC-31.
A file resource is a generic project resource that holds arbitrary file content (text or
binary). Each resource stores its bytes under a single data key whose name matches the resource's
leaf name (so e.g. a resource named manual.pdf has its data stored at the key
manual.pdf). This makes the on-disk project tree directly browsable and VCS-friendly.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAttribute key holding the authoritative content type for a file resource as a JSON string.static final StringAttribute key holding theFileResourceConfig(HTTP exposure config) as a JSON object.static final PatternValidation pattern for file resource names.static final ResourceTypeThe resource type for file resources.static final StringThe first path segment of the file resources servlet mount point. -
Method Summary
-
Field Details
-
RESOURCE_TYPE
The resource type for file resources. Lives in the platform namespace. -
ATTR_CONTENT_TYPE
Attribute key holding the authoritative content type for a file resource as a JSON string.- See Also:
-
ATTR_HTTP
Attribute key holding theFileResourceConfig(HTTP exposure config) as a JSON object. Absent until the user enables HTTP exposure.- See Also:
-
SERVLET_MOUNT
The first path segment of the file resources servlet mount point. Combined with/system/byWebResourceManager.addServlet, the public URL prefix is/system/files/....- See Also:
-
NAME_PATTERN
Validation pattern for file resource names. URL-safe per RFC 3986 unreserved chars: letters, digits, dot, dash, underscore. No whitespace or path separators.
-
-
Method Details
-
maxSizeBytes
public static long maxSizeBytes()- Returns:
- the configured maximum file resource size in bytes.
-
concurrency
public static int concurrency()- Returns:
- the configured servlet concurrency limit. Values <= 0 disable serving entirely.
-
isValidName
- Returns:
trueifnameis a valid file resource name. Folder names follow the same rule. The single-dot and double-dot names are rejected, since they have special meaning in path resolution.
-