Fetches an object (file) from S3, resolves it to the specified format (JSON, text, or binary),
and optionally caches it locally (on the box or within the native app).
Note: Cached data is stored under the /synapticon/oblac-drives/ prefix to align with the bundle's cache location.
If offline or if the fetch fails (including HTTP errors), the function falls back to retrieving the cached version.
Returns
A promise that resolves to the fetched object in the specified format.
Parameters
path: string
The S3 path to the object.
resolveTo: "json" | "text" | "blob"
The desired response format: 'blob', 'json', or 'text'.
cache: boolean
Whether to cache the fetched object locally. Defaults to false if not specified.
Fetches an object (file) from S3, resolves it to the specified format (JSON, text, or binary), and optionally caches it locally (on the box or within the native app).
Note: Cached data is stored under the
/synapticon/oblac-drives/
prefix to align with the bundle's cache location.If offline or if the fetch fails (including HTTP errors), the function falls back to retrieving the cached version.
Returns
A promise that resolves to the fetched object in the specified format.