public class

AttachmentHelper

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.util.AttachmentHelper

Summary

Nested Classes
enum AttachmentHelper.ValidationError  
class AttachmentHelper.ValidationResult  
Public Constructors
AttachmentHelper(XsrfInvocationChecker xsrfChecker, JiraAuthenticationContext jiraAuthenticationContext)
Public Methods
AttachmentHelper.ValidationResult validate(HttpServletRequest request, String filename, Long size)
Validates the uploaded image.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AttachmentHelper (XsrfInvocationChecker xsrfChecker, JiraAuthenticationContext jiraAuthenticationContext)

Public Methods

public AttachmentHelper.ValidationResult validate (HttpServletRequest request, String filename, Long size)

Validates the uploaded image. Validation includes - XSRF token check - Filename check (is it blank) - Size is not valid (Either not supplied by the client or is 0) - Filesize is above the max attachment size

Parameters
request where the image data is
filename filename of image
size size of image
Returns
  • Validation result