This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Apostrophe 2.19.1 (and 2.18.2): direct cropping of attachments, and bug fixes for attachments

Beginning with 2.18.2 and fully debugged in 2.19.1, specifying crop: true for an attachment schema field now works as originally intended, giving you an opportunity to crop an image that is directly attached to the doc rather than being fetched via an images widget.

In addition, when saving any doc with a schema, if an attachment field does not match a valid attachment that has actually been uploaded, that field is correctly nulled out. A check for this was always present but was not functional.

Also, if the attachment’s file extension is not in a valid fileGroup as configured via the attachments module, the field is nulled out. A check for this was also present but nonfunctional.

Finally, the crop: true option for attachments is saved successfully. This option allows for attachments to have a crop that is inherent to them, useful when there is no widget standing between the doc and the attachment.

All of these changes correct bugs in intended behavior. Certain checks were present in the code but not completely functional. If you need to update your configuration to add allowed file extensions, see apostrophe-attachments.