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
You can't modify the original fields of a doctype, so create a new field or clone and modify the entire doctype.
162
168
163
169
---
164
170
165
171
### Available Field Options
166
172
| Option | Description |
167
173
| :--- | :--- |
168
-
|`dialog_title` 🔴 | Upload dialog title to be displayed (✴️Frappe >= v14.0.0).<br/><br/>- Example: `"Upload Images"`<br/>- Default: `"Upload"`|
169
-
|`upload_notes`| Upload text to be displayed.<br/><br/>- Example: `"Only images and videos, with maximum size of 2MB, are allowed to be uploaded"`<br/>- Default: `""`|
170
-
|`disable_file_browser` 🔴 | Disable file browser uploads.<br/><br/>⚠️ *(File browser is always disabled in Web Form)*<br/><br/>- Default: `false`|
171
-
|`allow_multiple`| Allow multiple uploads.<br/><br/>⚠️ *(Field value is a JSON array of files url)*<br/><br/>- Default: `false`|
172
-
|`max_file_size`| Maximum file size (in bytes) that is allowed to be uploaded.<br/><br/>- Example: `2048` for `2KB`<br/>- Default: `Value of maximum file size in Frappe's settings`|
173
-
|`allowed_file_types`| Array of allowed file types (mimes) or extensions to upload. Prefix escaped RegExp string types with **$**.<br/><br/>⚠️ *(File extensions must have a leading dot ".")*<br/>⚠️ *(RegExp string types will not be used to in HTML accept attribute)*<br/><br/>- Example: `["image/*", "video/*", ".pdf", ".doc", "$audio\/([a-z]+)"]`<br/>- Default: `null` or `["image/*"]`|
174
-
|`max_number_of_files`| Maximum number of files allowed to be uploaded if multiple upload is allowed.<br/><br/>⚠️ *(Bypassing the maximum attachments of doctype might not work)*<br/><br/>- Example: `4`<br/>- Default: `Value of maximum attachments set for the doctype`|
175
-
|`crop_image_aspect_ratio`| Crop aspect ratio for images (✴️Frappe >= v14.0.0).<br/><br/>- Example: `1` or `16/9` or `4/3`<br/>- Default: `null`|
176
-
|`as_public`| Force uploads to be saved in public folder by default.<br/><br/>- Default: `false`|
177
-
|`allowed_filename` 🔴 | Only allow files that match a specific file name to be uploaded.<br/><br/>- Example: (String)`"picture.png"` or (RegExp String)`"/picture\-([0-9]+)\.png/"`<br/>- Default: `null`|
178
-
|`allow_reload`| Allow reloading attachments (✴️Frappe >= v13.0.0).<br/><br/>ℹ️ Affect the visibility of the reload button.ℹ️<br/><br/>- Default: `true`|
179
-
|`allow_remove`| Allow removing and clearing attachments.<br/><br/>ℹ️ Affect the visibility of the remove and clear buttons.ℹ️<br/><br/>- Default: `true`|
174
+
|**dialog_title** 🔴 | Upload dialog title to be displayed ️(🔶Frappe >= v14.0.0).<br/><br />🔹Example: **"Upload Images"**<br />🔹Default: **"Upload"**|
175
+
|**upload_notes**| Upload text to be displayed.<br/><br />🔹Example: **"Only images and videos, with maximum size of 2MB, are allowed to be uploaded"**<br />🔹Default: **""**|
176
+
|**disable_file_browser** 🔴 | Disable file browser uploads.<br/><br/>⚠️ *(File browser is always disabled in Web Form)*<br/><br />🔹Default: **false**|
177
+
|**allow_multiple**| Allow multiple uploads.<br/><br/>⚠️ *(Field value is a JSON array of files url)*<br/><br />🔹Default: **false**|
178
+
|**max_file_size**| Maximum file size (in bytes) that is allowed to be uploaded.<br/><br />🔹Example: **2048** for **2KB**<br />🔹Default: **Value of maximum file size in Frappe's settings**|
179
+
|**allowed_file_types**| Array of allowed file types (mimes) or extensions to upload. Prefix escaped RegExp string types with **$**.<br/><br/>⚠️ *(File extensions must have a leading dot ".")*<br/>⚠️ *(RegExp string types will not be used to in HTML accept attribute)*<br/><br />🔹Example: **["image/*", "video/*", ".pdf", ".doc", "$audio\/([a-z]+)"]**<br />🔹Default: **null** or **["image/*"]**|
180
+
|**max_number_of_files**| Maximum number of files allowed to be uploaded if multiple upload is allowed.<br/><br/>⚠️ *(Bypassing the maximum attachments of doctype might not work)*<br/><br />🔹Example: **4**<br />🔹Default: **Value of maximum attachments set for the doctype**|
181
+
|**crop_image_aspect_ratio**| Crop aspect ratio for images (🔶Frappe >= v14.0.0).<br/><br />🔹Example: **1** or **16/9** or **4/3**<br />🔹Default: **null**|
182
+
|**as_public**| Force uploads to be saved in public folder by default.<br/><br />🔹Default: **false**|
183
+
|**allowed_filename** 🔴 | Only allow files that match a specific file name to be uploaded.<br/><br />🔹Example: (String)**"picture.png"** or (RegExp String)**"/picture\-([0-9]+)\.png/"**<br />🔹Default: **null**|
184
+
|**allow_reload**| Allow reloading attachments (🔶Frappe >= v13.0.0).<br/><br />🔶 Affect the visibility of the reload button.🔶<br/><br />🔹Default: **true**|
185
+
|**allow_remove**| Allow removing and clearing attachments.<br/><br />🔶 Affect the visibility of the remove and clear buttons.🔶<br/><br />🔹Default: **true**|
180
186
181
187
---
182
188
183
189
### Available JavaScript Methods
184
190
| Method | Description |
185
191
| :--- | :--- |
186
-
|`enable_reload()`| Allow reloading attachments and show the reload button (Frappe >= v13.0.0). |
0 commit comments