public class TemporaryUploadedPicture extends Object implements Serializable
Constructor and Description |
---|
TemporaryUploadedPicture(String originalFileName,
int sourceWidth,
int sourceHeight,
String thumbnailFileName,
int thumbnailWidth,
int thumbnailHeight) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
File |
getOriginalFile() |
String |
getOriginalFileName() |
static @Nullable TemporaryUploadedPicture |
getPicture(File sourceFile,
String fileName,
String owningUserName)
Returns an object representing the original and thumbnail image
|
static @Nullable TemporaryUploadedPicture |
getPicture(InputStream source,
String fileName,
String owningUserName)
Returns an object representing the original and thumbnail image
|
int |
getSourceHeight() |
int |
getSourceWidth() |
File |
getThumbnailFile() |
String |
getThumbnailFileDownloadPath()
Doesn't have url encoding, unlike
getThumbnailFileDownloadUrl() . |
String |
getThumbnailFileDownloadUrl()
Just like
getThumbnailFileDownloadPath() but with the filename Url Encoded. |
int |
getThumbnailHeight() |
int |
getThumbnailWidth() |
public static @Nullable TemporaryUploadedPicture getPicture(File sourceFile, String fileName, String owningUserName) throws IOException
sourceFile
- the image uploaded by the userfileName
- a name for this image. It has no effect in the computation.owningUserName
- login of the user who uploaded the filecom.atlassian.core.exception.FailedPredicateException
- if there is insufficient memory to process the imageIOException
- in case of I/O exceptionpublic static @Nullable TemporaryUploadedPicture getPicture(InputStream source, String fileName, String owningUserName) throws IOException
source
- the image uploaded by the userfileName
- a name for this image. It has no effect in the computation.owningUserName
- login of the user who uploaded the filecom.atlassian.core.exception.FailedPredicateException
- if there is insufficient memory to process the imageIOException
- in case of I/O exceptionpublic File getOriginalFile()
public File getThumbnailFile()
public String getThumbnailFileDownloadPath()
getThumbnailFileDownloadUrl()
.public String getThumbnailFileDownloadUrl()
getThumbnailFileDownloadPath()
but with the filename Url Encoded.public int getThumbnailWidth()
public int getThumbnailHeight()
public int getSourceWidth()
public int getSourceHeight()
public String getOriginalFileName()
public void cleanup()
Copyright © 2003–2021 Atlassian. All rights reserved.