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
  • Media management
  • Media resource
  • Notification
  • Edit

observe_media_replace_file/2

Notification that a medium file has been changed (notify) The id is the resource id, medium contains the medium’s complete property map.

Type:

notify

Return:

return value is ignored

#media_replace_file{} properties:

  • id: m_rsc:resource_id()
  • medium: map|undefined

Edit on GitHub

Related documentation

Notifications

observe_media_update_done/2

Media update done notification. action is ‘insert’, ‘update’ or ‘delete’

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_media_identify_file/2

Try to identify a file, returning a map with file properties.

Notifications

observe_media_viewer/2

Request to generate a HTML media viewer for a resource. The HTML data can not contain any Javascript, as it might be serialized. This could…

Notifications

observe_media_upload_props/3

Notification that a medium file has been uploaded. This is the moment to change properties, modify the file etc. The folded accumulator is…

Notifications

observe_media_upload_rsc_props/3

Notification that a medium file has been uploaded. This is the moment to change resource properties, modify the file etc. The folded…

Notifications

observe_development_reload/2

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

Notifications

observe_identity_update_done/2

Notify that a user’s identity has been updated by the identity model.

GitHub © 2026 Zotonic