public class ViewThumbnailServlet extends ViewAttachmentServlet
Constructor and Description |
---|
ViewThumbnailServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
getInputStream(String attachmentPath,
InputStreamConsumer<io.atlassian.blobstore.client.api.Unit> consumer)
Gets the attachment file (not the file name) that corresponds to the requested attachment.
|
protected void |
setResponseHeaders(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the content type, content length and "Content-Disposition" header
of the response based on the values of the attachement found.
|
getAttachment, hasPermissionToViewAttachment
attachmentQuery, doGet, getJiraAuthenticationContext, getUserName
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
protected void getInputStream(String attachmentPath, InputStreamConsumer<io.atlassian.blobstore.client.api.Unit> consumer) throws IOException, PermissionException
AbstractViewFileServlet
getInputStream
in class ViewAttachmentServlet
attachmentPath
- the attachment pathconsumer
- a procedure that consumes the stream with the attachment data.IOException
- if there is a problem getting the attachment.PermissionException
- if the user has insufficient permission to see the attachment.AbstractViewFileServlet.getInputStream(String, com.atlassian.jira.util.io.InputStreamConsumer)
protected void setResponseHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
ViewAttachmentServlet
setResponseHeaders
in class ViewAttachmentServlet
request
- HTTP requestresponse
- HTTP responseCopyright © 2002-2015 Atlassian. All Rights Reserved.