Skip to content
Zotonic
  • Start
  • Cookbook
  • 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_done/2

A resource import has completed. The options describe this particular import; recursively imported resources can have different options.

Notifications

observe_rsc_import_fetch_result/3

Enrich the decoded resource-export envelope with import metadata. The response headers belong to final_url , after any redirects. Return…

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_rsc_export_done/3

Extend the full resource-export envelope returned by m_rsc_export:full/2 . The accumulator is the export map, not the nested resource

GitHub © 2026 Zotonic