# observe\_media\_upload\_prepare/3

Source: https://zotonic.com/docs/3200/observe_media_upload_prepare-3

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

Language: en



Notification to compose upload transformations after sanitization and before archival. The folded accumulator is a `#media_upload_preprocess{}` record or an error. Observers must propagate errors unchanged. Replacement files must be written inside `temp_dir`, which core cleans up after archival or failure.

Type:

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

Return:

modified `#media_upload_preprocess{}` or `{error, Reason}`

`#media_upload_prepare{}` properties:

- options: `list`
- temp\_dir: `file:filename_all()`

License: 

Attribution: 

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