public class CMAAssetFile extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CMAAssetFile.Details
Read only structure, detailing the content of the asset uploaded.
|
| Constructor and Description |
|---|
CMAAssetFile() |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Get the content type stored here.
|
CMAAssetFile.Details |
getDetails() |
String |
getFileName() |
CMALink |
getUploadFrom() |
String |
getUploadUrl() |
String |
getUrl()
Return the public accessible url of this asset.
|
CMAAssetFile |
setContentType(String contentType)
Set what content type is stored in this asset.
|
CMAAssetFile |
setFileName(String fileName)
Set a filename to be used for identifying the file.
|
CMAAssetFile |
setUploadFrom(CMALink uploadFrom)
Set a link to a Contentful Upload entry, to be used for processing the binary data from.
|
CMAAssetFile |
setUploadUrl(String upload)
Set a public accessible url to be used for processing the binary data from.
|
public String getUrl()
This url only exists, if the asset is uploaded and processed
ModuleAssets.process(CMAAsset, String).
public String getUploadUrl()
public CMAAssetFile setUploadUrl(String upload)
public CMALink getUploadFrom()
ModuleUploadspublic CMAAssetFile setUploadFrom(CMALink uploadFrom)
ModuleUploadspublic CMAAssetFile.Details getDetails()
public String getFileName()
public CMAAssetFile setFileName(String fileName)
fileName - the name of the file.public String getContentType()
Constants.DEFAULT_CONTENT_TYPE,
Constants.OCTET_STREAM_CONTENT_TYPEpublic CMAAssetFile setContentType(String contentType)
contentType - the content type used for this file.Constants.DEFAULT_CONTENT_TYPE,
Constants.OCTET_STREAM_CONTENT_TYPECopyright © 2017 Contentful, GmbH.. All Rights Reserved.