contentful.java
contentful.java copied to clipboard
Could not decode Image asset because of MimeType validation error
Hello!
We're currently trying to use the Contentful Java SDK on an Android application to consume our Content Type which includes an Image Asset inside the entity.
The exception obtained from the SDK comes from a Mime-Type validation which requires the image assets to include the image/ prefix as follows:
final String mimeType = mimeType();
if (mimeType == null || !mimeType.startsWith("image")) {
throw new IllegalStateException("Asset does not have an image mime type.");
I'm actually pretty confused because our type is indeed an image, so I'm not sure what is triggering this error, if the SDK or anything else in between, including our space configuration.
If you need any additional information please let me know. Thanks.