Skip to content
Zotonic
  • Start
  • Guides
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Notifications
  • Reference
  • Backend developer
  • Import and migration
  • Notification
  • Import

observe_import_resource/2

An external feed delivered a resource. First handler can import it. Return:: {ok, m_rsc:resource_id()}, {error, Reason}, or undefined

Type:

first

Return:

#import_resource{} properties:

  • source: atom|binary
  • source_id: integer|binary
  • source_url: binary
  • source_user_id: binary|integer
  • user_id: integer
  • name: binary
  • props: m_rsc:props_all()
  • urls: list
  • media_urls: list
  • data: any

Edit on GitHub

Related documentation

Notifications

observe_rsc_import_fetch/2

Fetch the data for an import of a resource. Returns data in the format used by m_rsc_export and m_rsc_import. Either returns the JSON data

Notifications

observe_import_csv_definition/2

Find an import definition for a CSV file by checking the filename of the to be imported file.

Models

rsc_import

Import model for resources exported by m_rsc_export .

Notifications

observe_media_import_medium/2

Notification to import a medium record from external source. This is called for non-file medium records, for example embedded video. If the…

Notifications

observe_media_import/2

Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue movies for conversion…

Notifications

observe_rsc_upload/2

Upload and replace the resource with the given data. The data is in the given format.

Notifications

observe_development_make/2

Runs the development make process and reloads newly compiled BEAM files after a manual request.

Notifications

observe_development_reload/2

Reloads templates, modules, translations, and other indexed development files after a manual request.

Notifications

observe_module_ready/2

Signals that the active modules or their indexed templates, actions, models, and other components have changed.

GitHub © 2026 Zotonic