> For the complete documentation index, see [llms.txt](https://uci.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uci.sunbird.org/use/developer/uci-basics/transformers/odk-transformer/media-messages.md).

# Media Messages

## Overview

UCI provides an option to send media files to user or receive the media files from user. We use different types of styling tags to send media files to user.

### 1. Send media to user

We use below styling tags to send media files to user.

1. image
2. audio
3. video
4. file (Document files only)

As the name says these tags are used to specify the media type to be sent to user. These styling tags will be added

**Steps for adding media message**

For sending a media to user, add following properties in ODK form :

* **type** : `select_one <field_name>`\
  Column *type* describes the property of any particular message.
* **name** : `<field_name>`\
  Column *name* refers to unique *field\_name* of any message.
* **label** : `<text>`\
  In label, we can write text content that we want to send to user. For media files mention the file name that you are uploading inside {} placeholders. For example, if your file name is 'test.png', set the label as {test.png}.
* **bind::stylingTags** : `image/audio/video/file`\
  This column indicates, which type of media file should be displayed to user.
* **bind::caption** : \<caption>\
  This column has the caption for media file specifically for image/file. As for whatsapp the caption is required.

**ODK Styling tag example:**

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FWt01PJRe9vhEmhm1Vuk8%2Fmedia-styling-tag.png?alt=media\&token=aaf99e68-d17b-4a37-a7e2-2ae3268726e5)

**Whatsapp Preview**

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FX1dLDiHAzpq5fledzLH6%2Fmedia-image-whatsapp-preview.png?alt=media\&token=24ee36f5-df48-4109-8428-a4b8d37883f3)

### 2. Receive media from user

In ODK forms we can specify which type of content we want from the user. For media files, we should mention the type for media ones. Below are the types for media files.

1. image
2. audio
3. video
4. file

**2.1 Steps for expecting media message**

For receiving media from user, add following properties in ODK form :

* **type** : `image/audio/video/file`\
  Column *type* describes the property of any particular message.
* **name** : `<field_name>`\
  Column *name* refers to unique *field\_name* of any message.
* **label** : `<text>`\
  In label, we can write text content that we want to send to user.

**2.2 Allowed files types**

| Field Type | Allowed Media Type                                                                                           |
| ---------- | ------------------------------------------------------------------------------------------------------------ |
| Image      | image/jpg, image/jpeg, image/gif, image/png                                                                  |
| Audio      | audio/mp3, audio/aac, audio/wav, audio/flac, audio/ogg, audio/ogg; audio/wma, audio/x-ms-wma, audio/mpeg     |
| Video      | video/mp4, video/flc, video/mov, video/wmv, video/mkv, video/quicktime, video/x-matroska, video/x-flv        |
| File       | application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document |

**2.3 ODK media type example**

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FzHE96gVBTUQQYvlRjZtf%2Fupload-media-odk.png?alt=media\&token=e4809a33-4070-4e6a-a5a3-b486f51b7748)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://uci.sunbird.org/use/developer/uci-basics/transformers/odk-transformer/media-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
