# observe\_rsc\_upload/2

Source: https://zotonic.com/docs/2053/observe_rsc_upload-2

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

Language: en



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

Type:

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

Return:

\{ok, Id\} or \{error, Reason\}, return \{error, badarg\} when the data is corrupt.

`#rsc_upload{}` properties:

- id: `m_rsc:resource()|undefined`
- format: `json|bert`
- data: `binary|map`

License: 

Attribution: 

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