corda / net.corda.node.webserver.servlets / AttachmentDownloadServlet

AttachmentDownloadServlet

class AttachmentDownloadServlet : HttpServlet

Allows the node administrator to either download full attachment zips, or individual files within those zips.

GET /attachments/123abcdef12121 -> download the zip identified by this hash GET /attachments/123abcdef12121/foo.txt -> download that file specifically

Files are always forced to be downloads, they may not be embedded into web pages for security reasons.

TODO: See if there's a way to prevent access by JavaScript. TODO: Provide an endpoint that exposes attachment file listings, to make attachments browseable.

Constructors

<init> AttachmentDownloadServlet()

Allows the node administrator to either download full attachment zips, or individual files within those zips.

Functions

doGet fun doGet(req: HttpServletRequest, resp: HttpServletResponse): Unit