com.atlassian.jira.rest.api.util
Class AttachmentHelper
java.lang.Object
com.atlassian.jira.rest.api.util.AttachmentHelper
public class AttachmentHelper
- extends Object
- Since:
- v5.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttachmentHelper
public AttachmentHelper(XsrfInvocationChecker xsrfChecker,
JiraAuthenticationContext jiraAuthenticationContext)
validate
public AttachmentHelper.ValidationResult validate(javax.servlet.http.HttpServletRequest request,
String filename,
@Nullable
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 isfilename
- filename of imagesize
- size of image
- Returns:
- Validation result
Copyright © 2002-2012 Atlassian. All Rights Reserved.