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);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.