Is it possible to get the actual file stored on the file system for an attachment programatically in a Java plugin? i.e. versioned attachments seem to exist on the file system in a location such as
<install dir>/confluence/home/attachments/ver003/37/65/65537/24/200/950274/1081345/1
I haven't seen a way to get this path in the Attachment object--the urlPath, downloadPath and exportPath don't give me anything useful for this.
Thanks for the ideas. Found a way to do what I needed to using the content of the attachment instead (available as an InputStream from the Attachment object).
Hi Robert,
there are different storages for files, on the filesystem or in the database. So getting the concrete path depends on the storage strategy and is not always the same.
For filebased storages the directory structure is described here. Hope this helps.
Regards,
Mirko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I believe there should be a way, as the Confluence CLI plugin has such a function: https://bobswift.atlassian.net/wiki/display/CSOAP/Documentation#Documentation-getAttachment
Would that work for you?
Kind regards,
Peter
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.