Attachments
Frappe allows attachment of files to documents. Users with Read permissions on a particular document will also be able to access the files attached to it. Users can also access the File Manager from the sidebar.
How to Attach a New File
There are several ways to attach a file to a document.
Select File
Drag and Drop
Uploaded File
Attach a file a that was previously uploaded, to a different document.
Web Link
If you use a separate server for files or use online services like Dropbox or Docs, you can attach a file by providing a link to it.
Camera
Attach Images by taking a photo using your device's camera.
File Manager
All the attached files are listed in the File Manager. You can access these by navigating here:
Home > Tools > Files
Import Zip
You can also bulk import multiple files at once using the Import Zip feature.
- Go to File List > Menu > Import Zip.
- Upload a zip file.
- After the zip file is uploaded, it's contents will be extracted and each file will be created as a new File record.
Note: Hidden files (files starting with
.
) are not extracted when importing from a zip file.
Export as Zip
You can also bulk export multiple files at once using the Export as Zip feature.
- Go to File List.
- Select multiple files.
- Click on Actions > Export as zip.
- After the zip file is downloaded, you can import it in another site using Import Zip feature or send it across via email.
Cropping Images
You can crop .jpeg
and .png
images by clicking on the crop icon.
Optimizing Images
Images can be optimized to reduce their file size. Currently optimizing an image does the following:
- Resizes it to fit a max-width of 1920px and a max-height of 1080px, while preserving the aspect ratio
- Uses optimal encoder settings
- Reduces the quality to 85%
Toggle optimization during upload
Optimize an already uploaded image
Limits
A limit of 10MB is applicable on file size per attachment by default. For self-hosted users, this can be changed by setting max_file_size
in your site's configuration file.
Attachments per Document
You can limit how many files can be attached to a specific document.
Step 1: Navigate to Customize Form
Home > Customization > Customize Form
Step 2: Select Document Type
Select the document type for which you'd like to set this limit.
Step 3: Set Limit
Set the value of Max Attachments to the maximum number of attachments allowed for this document type.
Once you're satisfied with the changes, click the Update button. That's it! The maximum number of attachments per document will now be validated every time a new attachment is added to a document of this type.