Skip to main content
The Files SDK adds Fluid’s Digital Asset Management (DAM) picker to your application. You can let users browse approved assets, upload files, import a public URL, search Unsplash, or generate an image with AI. The package works with vanilla JavaScript and includes React bindings.

Install the SDK

Choose an asset

Create one picker instance, then call open() in response to a user action.
For browser integrations outside Fluid Admin, pass a public (pub-) token and the company’s shop name. Do not put a company or partner token in client-side code. See Authentication for token guidance.

Configure the picker

Use these options to shape the selection workflow.

Select sources

The SDK supports five source identifiers:
  • local_file_system
  • url
  • dam_library
  • unsplash
  • ai_generate
For example, you can limit an editor to uploads and the approved DAM library:

Configure transformations

All available transformation tools are enabled by default. Set individual tools to false when a workflow should offer fewer choices.
Set transformations: false for files that should be returned without an editing step.

Use the selection result

onSelect receives a result with two views of the selection:
  • result.asset is the first selected asset.
  • result.assets is every selected asset and is always an array.
Each selected asset includes its public url, assetCode, name, and mimeType. It can also include dimensions, file size, a variant identifier, and a numeric DAM identifier.
Store the assetCode with the URL when you need a stable DAM identity as well as a renderable asset location.

Open an existing asset for editing

Pass asset to skip source selection and open one existing asset in the transformation editor. You can identify it by its DAM asset code.
You can also pass an asset URL, or both the URL and asset code.

Use the React hook

Import React bindings from @fluid-app/dam-picker/react. The hook returns an open() function and the current open state.
For declarative control, import DamPickerModal from the same React entry point.

Clean up an instance

Call destroy() when the component or view that owns a vanilla JavaScript picker is removed.
This closes the picker and removes the resources associated with that instance.