class NodeAttachmentService : AttachmentStorage
Stores attachments in the specified local directory, which must exist. Doesnt allow new attachments to be uploaded.
OnDiskHashMismatch |
class OnDiskHashMismatch : Exception |
<init> |
NodeAttachmentService(storePath: Path) Stores attachments in the specified local directory, which must exist. Doesnt allow new attachments to be uploaded. |
automaticallyExtractAttachments |
var automaticallyExtractAttachments: Boolean If true, newly inserted attachments will be unzipped to a subdirectory of the storePath. This is intended for human browsing convenience: the attachment itself will still be the file (that is, edits to the extracted directory will not have any effect). |
checkAttachmentsOnLoad |
var checkAttachmentsOnLoad: Boolean |
storePath |
val storePath: Path |
importAttachment |
fun importAttachment(jar: InputStream): SecureHash Inserts the given attachment into the store, does |
openAttachment |
fun openAttachment(id: SecureHash): Attachment? Returns a newly opened stream for the given locally stored attachment, or null if no such attachment is known. The returned stream must be closed when you are done with it to avoid resource leaks. You should probably wrap the result in a JarInputStream unless youre sending it somewhere, there is a convenience helper for this on Attachment. |