# observe\_filestore\_credentials\_revlookup/2

Source: https://zotonic.com/docs/3140/observe_filestore_credentials_revlookup-2

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

Language: en



Resolve credentials for a file already registered at a remote service and location.

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

`#filestore_credentials_revlookup{}` properties:

- `service`: stored backend identifier, such as `<<"s3">>`.
- `location`: stored full remote URL.

Return `{ok, #filestore_credentials{}}` with `service`, `service_url`, `location` and backend-specific `credentials`, or `undefined` when the request cannot be handled. Records are defined in `zotonic_file.hrl`.

This reverse lookup preserves the stored location instead of deriving a new URL from current upload settings. The standard handler only supplies credentials for its configured service. Deletion separately checks that the stored URL matches the configured service URL, protecting files after a database is copied to a site with different storage settings. Never log or publish returned credentials.

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

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/3140?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/3140?language=en>)
