Showing an image in the browser

0
I have been working on a widget which generates images from certain charts. I want to make it possible for the users to download/view these images in the browser. The images are being rendered and FileDocuments are being created but I haven't managed to generate a proper URL to show the image in the browser. I have found a topic covering a similar problem on the forum and tried it link. Edit: I want to show an image in the browser by doing something like this and sticking it in a dijit.Dialog: <img src="./file?fileID=18" /> Browsing to the url directly shows this: { "type":"exception", "description":"The file '9630b66b-05ed-4ee4-bf2d-6f1f60b47cba.png' could not be found.", "result":560 } When I set a breakpoint on the microflow where the URL is generated I can see that the FileDocument.HasContents-attribute is set to false. But when looking at the file on the file system it looks like a standard png. The file is located in the applications temp directory.
asked
1 answers
2

Are you sure that you've uploaded the file correctly to the FileDocument? This error usually occurs when you've set the name of the FileDocument but haven't actually uploaded any data to it. You can save data to the FileDocument by either using the FileUploader widget or via java:

Core.storeFileDocument
answered