# observe\_media\_import/2

Source: https://zotonic.com/docs/1757/observe_media_import-2

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

Language: en



Notification to translate or map a file after upload, before insertion into the database Used in mod\_video to queue movies for conversion to mp4. You can set the post\_insert\_fun to something like fun(Id, Medium, Context) to receive the medium record as it is inserted.

Type:

[first](/id/doc_developerguide_notifications#notification-first)

Return:

modified `#media_upload_preprocess{}`

`#media_import{}` properties:

- url: `binary`
- host\_rev: `list`
- mime: `binary`
- metadata: `tuple`

License: 

Attribution: 

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