20#ifndef CWIST_SYS_APP_ASSETS_H
21#define CWIST_SYS_APP_ASSETS_H
33#define CWIST_ASSET_DEFAULT_PREFIX "/assets"
36#define CWIST_ASSET_IMMUTABLE_CACHE "public, max-age=31536000, immutable"
79 size_t len,
const char *content_type);
91 const char *content_type);
cwist_error_t cwist_app_asset_add_file(struct cwist_app *app, const char *name, const char *path, const char *content_type)
Register an asset from a file, read once now.
cwist_error_t cwist_app_asset_add(struct cwist_app *app, const char *name, const void *data, size_t len, const char *content_type)
Register an asset from memory. The data is copied.
const char * cwist_app_asset_url(struct cwist_app *app, const char *name)
Content-hashed URL of the newest asset registered under name.
cwist_error_t cwist_app_asset_prefix(struct cwist_app *app, const char *url_prefix)
Choose the URL prefix assets are served under.
Main Application Context.
Integrated error structure used throughout the system.
Unified error code and type definitions for the CWIST system layer.