this visual force is like this
and the controller just do a query on a document, encode the document body in base64, and returns it.So if any of you have a visual force with contenttype image/jpeg which works, it would help me a lot if you share your solutionMerry Christmas everyone!<apex:page showHeader="false" sidebar="false" standardStylesheets="false" controller="pageController" contentType="image/jpeg">
{!bodyContent}
</apex:page>
2 risposte
I cannot for the life of me get this to work. All of the data that I get back when using cURL to pull down the page I get
In order for the image to be properly rendered as a true jpg it'll have to beASCII text, with very long lines, with no line terminators
with some sort of EXIF or JFIF standard. To do this for jpeg (or any image format) you have to convert the base64 image to a bytecode image. I cannot find anyway to do this inside of Salesforce. I did find the post that mentioned the code you have above but could not get it to work. I wonder if the person who got it to work was using a specific browser that allowed it.JPEG image data