For a page we can do something like -
Is there something similar which can be done for attachment upload too?
attachmentManager.saveAttachment(Attachment, Attachment, InputStream);
There doesn’t seem a method which can take in DefaultSaveContext. Or is there? Or is there some other way to achieve this?