# observe\_filestore\_credentials\_lookup/2

Source: https://zotonic.com/docs/3136/observe_filestore_credentials_lookup-2

URI: https://zotonic.com/id/3136

Language: en



Resolve a local storage path to a remote service, destination and credentials.

Type: [first](/id/doc_developerguide_notifications#notification-first).

`#filestore_credentials_lookup{}` properties:

- `id`: optional resource id, available for resource-specific backend selection.
- `path`: backend-relative file path to store, read or delete.

Return `{ok, #filestore_credentials{}}` or `undefined` when not handled or no credentials are configured. The standard handler selects the site's configured service using the path; custom observers can also use the resource id.

The returned record contains `service` (backend identifier), `service_url` (base URL), `location` (full destination URL), and `credentials` (backend-specific secret configuration). These records are defined in `zotonic_file.hrl`. Do not expose credentials in templates, logs or public API responses. `#filestore_credentials{}` is a result record, not a separate notification.

See <a href="/id/doc_module_mod_filestore" class="doc-reference doc-reference-module"><code>module#mod_filestore</code></a> for supported services and configuration.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/3136?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/3136?language=en>)
