I have a REST service that retruns byte[]
I like to create an image (Ext.Img) which content is the service result
Service
@RequestMapping(value = "/retrieve_thumbnail", method = RequestMethod.GET)
public byte[] retrieveBDocumentThumbnail(@RequestParam String modelName,@RequestParam String modelVersion) throws BdocWebAccessException {
return service.retrieveBDocumentThumbnail(modelName, modelVersion);
}
Image
Ext.create("Ext.Img", {
src:'tablet/bDocument/retrieve_thumbnail?modelName=MODELE_INT_003_TYPES_DONNEES&modelVersion'
})
The service is invocked but I have this message in the javascript Console:
Resource interpreted as Image but transferred with MIME type text/plain: "http://localhost:8080/bdoci-tablet/tablet/bDocument/retrieve_thumbnail?modelName=MODELE_INT_003_TYPES_DONNEES&modelVersion".
I think that the problem is related to the format, How can I fix this?