You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/media.md
+36-21Lines changed: 36 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ For hands-on practice with adding media attachments in XLSForm, see KoboToolbox
30
30
31
31
To add media files to questions or notes in your XLSForm:
32
32
1. Add a new question in the `survey` worksheet, specifying the **type**, **name**, and **label** (optional).
33
-
- Use a **note** question type if you want to display the media file without collecting any data (e.g., an organization logo or introduction video).
34
-
- Adding a label is optional when including a media file.
33
+
- Use a **note** question type if you want to display the media file without collecting any data (e.g., an organization logo or introduction video).
34
+
- Adding a label is optional when including a media file.
35
35
2. Add a column for the media you want to include. Name it `image`, `video`, or `audio`, depending on the media type.
36
36
3. In the media column, in the row of the question you have added, enter the exact name of the media file **including the extension**.
37
-
- For example: logo.png or intro.mp4.
37
+
- For example: `logo.png` or `intro.mp4`.
38
38
39
39
**survey worksheet**
40
40
@@ -44,9 +44,11 @@ To add media files to questions or notes in your XLSForm:
44
44
| survey |
45
45
46
46
<pclass="note">
47
-
<strong>Note:</strong> Previously, the format `media::file_type` was used for media column names (e.g., `media::image`, `media::video`, `media::audio`). The simplified format using only the media type without the `media::` prefix is now more commonly adopted (e.g., `image`, `video`, `audio`).
47
+
<strong>Note:</strong> Previously, the format <code>media::file_type</code> was used for media column names (e.g., <code>media::image</code>, <code>media::video</code>, <code>media::audio</code>). The simplified format using only the media type without the <code>media::</code> prefix is now more commonly adopted (e.g., <code>image</code>, <code>video</code>, <code>audio</code>).
48
48
</p>
49
49
50
+
### Uploading media files to KoboToolbox
51
+
50
52
To upload the media files to KoboToolbox:
51
53
1. Go to your [KoboToolbox account](https://www.kobotoolbox.org/sign-up/).
52
54
2. In your KoboToolbox project, navigate to **SETTINGS > Media**.
@@ -60,10 +62,10 @@ To upload the media files to KoboToolbox:
60
62
To add media files to option choices in your XLSForm:
61
63
1. Add a [select type question](https://support.kobotoolbox.org/question_types_xls.html#select-question-types) in the `survey` worksheet.
62
64
2. In the `choices` worksheet, add a **list_name**, **name**, and **label** (optional) for your choices.
63
-
- Adding a label is optional when including a media file. If you wish to use the media files as options label, omit the label text.
65
+
- Adding a label is optional when including a media file. If you wish to use the media files as options label, omit the label text.
64
66
3. Add a column for the media you want to include. Name it `image`, `video`, or `audio`, depending on the media type.
65
67
4. In the media column, in the row of the choices you have added, enter the name of the media file **including the extension**.
66
-
- For example: goat.png or fish.png
68
+
- For example: `goat.png` or `fish.png`
67
69
68
70
**survey worksheet**
69
71
@@ -83,6 +85,8 @@ To add media files to option choices in your XLSForm:
83
85
| animals | fish | Fish | fish.png |
84
86
| choices |
85
87
88
+
### Uploading media files to KoboToolbox
89
+
86
90
To upload the media files to KoboToolbox:
87
91
1. Go to your [KoboToolbox account](https://www.kobotoolbox.org/sign-up/).
88
92
2. In your KoboToolbox project, navigate to **SETTINGS > Media**.
@@ -96,11 +100,11 @@ In XLSForms that are [translated in multiple languages](https://support.kobotool
96
100
To add media files for different languages in your survey worksheet:
97
101
98
102
1. Rename your media columns using the format **media_type::language (code)**, where `media_type` is the type of media file and `language` is the default language.
99
-
- For example: `image::English (en)`
103
+
- For example: `image::English (en)`
100
104
2. Add a new media column for each translation language using the format **media_type::language (code)**.
101
-
- For example: `audio::Spanish (es)`
105
+
- For example: `audio::Spanish (es)`
102
106
3. In the media column for each language, enter the name of the media file you wish to include, including the extension.
103
-
- To use the same media file for each language, enter the file name from the default language column in the translation language column.
107
+
- To use the same media file for each language, enter the same file name as the one in the default language column.
104
108
105
109
<pclass="note">
106
110
<strong>Note:</strong> If a media file is not listed in a translation column, it will not be displayed for that language.
@@ -113,6 +117,8 @@ To add media files for different languages in your survey worksheet:
113
117
| note | intro | Before you answer the form, watch the video below: | intro.mp4 | intro_ny.mp4 |
114
118
| survey |
115
119
120
+
### Uploading media files to KoboToolbox
121
+
116
122
To upload the translated media files to KoboToolbox:
117
123
1. Go to your [KoboToolbox account](https://www.kobotoolbox.org/sign-up/).
118
124
2. In your KoboToolbox project, navigate to **SETTINGS > Media**.
@@ -127,18 +133,18 @@ To upload the translated media files to KoboToolbox:
127
133
128
134
<details>
129
135
<summary><strong>Error when deploying or viewing form</strong></summary>
130
-
<br>
131
-
If you face an error when deploying or viewing your form, check the following:
136
+
If you face an error when deploying or viewing your form, check the following:
132
137
<ul>
133
138
<li>The media file has been uploaded to KoboToolbox in the <strong>Media</strong> tab of the <strong>SETTINGS</strong> page.</li>
134
139
<li>The file name in your XLSForm matches the media file name and extension exactly.</li>
135
140
</ul>
136
141
</details>
137
142
143
+
<br>
144
+
138
145
<details>
139
146
<summary><strong>Media files not appearing in deployed form</strong></summary>
140
-
<br>
141
-
If media files are not appearing in your deployed form, check the following:
147
+
If media files are not appearing in your deployed form, check the following:
142
148
<ul>
143
149
<li>The media file has been uploaded to KoboToolbox in the <strong>Media</strong> tab of the <strong>SETTINGS</strong> page.</li>
144
150
<li>The file name in your XLSForm matches the media file name and extension exactly.</li>
@@ -147,29 +153,38 @@ To upload the translated media files to KoboToolbox:
147
153
</ul>
148
154
</details>
149
155
156
+
<br>
157
+
150
158
<details>
151
159
<summary><strong>Changing the size of a media file</strong></summary>
152
160
To control the size of images displayed in your questions or choices, you must upload media files with the desired dimensions. Note that using very large files can increase loading times in Enketo forms.
153
161
</details>
154
162
163
+
<br>
164
+
155
165
<details>
156
166
<summary><strong>Form takes a long time to load</strong></summary>
157
-
<br>
158
-
Enketo forms will load slowly if your media files are large. Reduce the size of image, video, or audio files before uploading them to the server to improve loading times.
167
+
Enketo forms will load slowly if your media files are large. Reduce the size of image, video, or audio files before uploading them to the server to improve loading times.
159
168
</details>
160
169
170
+
<br>
171
+
161
172
<details>
162
-
<summary><strong>Changing alignment of media files</strong></summary>
163
-
Media in KoboToolbox forms is center-aligned by default, and custom alignment (left or right) is not possible.
173
+
<summary><strong>Changing alignment of media files</strong></summary>
174
+
Media in KoboToolbox forms is center-aligned by default, and custom alignment (left or right) is not possible.
164
175
</details>
165
176
177
+
<br>
178
+
166
179
<details>
167
-
<summary><strong>Animated GIF files not supported</strong></summary>
168
-
Animated GIF files are not currently supported by either Enketo web forms or the KoboCollect Android app.
180
+
<summary><strong>Animated GIF files not supported</strong></summary>
181
+
Animated GIF files are not currently supported by either Enketo web forms or the KoboCollect Android app.
169
182
</details>
170
183
184
+
<br>
185
+
171
186
<details>
172
-
<summary><strong>Unable to upload media file</strong></summary>
173
-
The maximum size for media uploads is 100 MB. Files exceeding this limit must be reduced in size before uploading.
187
+
<summary><strong>Unable to upload media file</strong></summary>
188
+
The maximum size for media uploads is 100 MB. Files exceeding this limit must be reduced in size before uploading.
0 commit comments