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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.