How to get the path to the attachment?
def path = ComponentAccessor.getAttachmentPathManager().getAttachmentPath()log.info("Path " + path);
But there is no attachment in this directory/
Where are you running this script ? on your production instance or test instance ?
Normally, when backups are restored on test instances , many administrators do not take attachments due to the size of the attachments directory.
On my instance.I tried it like this, it works. Is there a better way?
File attachmentFile = AttachmentUtils.getAttachmentFile(numberAttachments);
It looks like you're new here. Sign in or register to get started.