A small plugin for Frappe that adds the support of customizations to the attach control.
- Frappe >= v13.0.0
- Get the plugin from Github
(Required only once)
bench get-app https://github.com/kid1194/frappe-better-attach-control
- Install the plugin on any instance/site you want
bench --site [sitename] install-app frappe_better_attach_control
- Check the usage section below
- Go to the app directory (frappe-bench/apps/frappe_better_attach_control) and execute:
git pull
- Go back to the frappe-bench directory and execute:
bench --site [sitename] migrate
- In case you need to restart bench, execute:
bench restart
- Uninstall the plugin from the instance/site
bench --site [sitename] uninstall-app frappe_better_attach_control
- Uninstall the plugin from bench
bench remove-app frappe_better_attach_control
- Go to Customization > Customize Form
- Enter the form type/name (Ex: 'User')
- Scroll down to the form fields area and edit the
Attach
orAttach Image
fields you want - In the
options
property of the fields, add a JSON object of the customizations you want. Example:{"allowed_file_types": ["jpg", "png", "gif"]}
upload_notes |
Upload text to be displayed. Example: Default: |
allow_multiple |
Allow multiple uploads. Default: |
max_file_size |
Maximum file size (in bytes) that is allowed to be uploaded. Example: Default: |
allowed_file_types |
Array of allowed file types (mimes) or extensions to upload. Example: Default: |
max_number_of_files |
Maximum number of files allowed to be uploaded if multiple upload is allowed. Example: Default: |
crop_image_aspect_ratio |
Crop aspect ratio for images (Frappe >= v14.0.0). Example: Default: |
- Attach
- Attach Image
HTML display for multiple files upload inAttach
controlDisplay popover for multiple files upload inAttach Image
control
MIT