Content.PickOptions
luastra/contentContent.PickOptions is the checked configuration record accepted by the related SDK operation. Required fields establish the minimum contract, while optional fields preserve documented defaults when omitted.
Before you use it
Add luastra/content to this module's dependencies in luastra.json, then import it with require("luastra/content"). Declare content.pick for browser selection and content.upload for transfer. Upload requires a server-created intent from an authenticated declared backend function. Application code must never construct a provider URL, file path, data URL, blob URL, bucket path, or upload handle.
How it fits
Content types describe checked ephemeral image references and asynchronous selection/upload results; they are erased after Luau analysis.
When to use it
Use Content.PickOptions when a reusable variable or helper passes configuration to the related SDK operation. The exported type keeps optional and required fields aligned with the checked public contract.
Fields or definition
| Parameter | Type / values | Description |
|---|---|---|
| maximumBytes | number? | Checked maximumBytes field of Content.PickOptions; its exact admitted type is number?. |
| maximumWidth | number? | Checked maximumWidth field of Content.PickOptions; its exact admitted type is number?. |
| maximumHeight | number? | Checked maximumHeight field of Content.PickOptions; its exact admitted type is number?. |
What happens next
A type-safe dynamic image, selection, transfer, or progress annotation.
Failures and fixes
Cancellation, malformed or expired handles, unsupported media types, excessive bytes or dimensions, offline transfer, authorization denial, and decode failure remain explicit branches. Release previews, request fresh display grants after UI.Image.onError, and never persist or log upload/content handles.
Availability
Private source foundation after 0.5.0-alpha; browser PNG/JPEG selection and upload are automated, while camera and native picker certification remain later evidence gates.
Exact declaration
export type PickOptions = { maximumBytes: number?, maximumWidth: number?, maximumHeight: number? }