Load Image saved locally

  

I am totally new to Outsystems and tried looking for a solution to this problem but am getting nowhere.


I have a screen with just a Image widget, lets say screen 2 which accepts an input variable called imageURI. On Screen 1, I am using a Cordova plugin to open the camera and edit the image and get a local URI (Image saved to local file path) that I pass to the image widget. The URI is of the type file:///android/o/emulated/ and I am testing this on my device and not on the Outsystems now app. 


I've tried setting source type for the local Image to all 3, but looks like only type "External URI" accepts a text value. How do I go about this?

Hi Bharath,

A suggestion is to set the "Type" property of the Image widget to "Binary Data", and pass to it the binary data of your picture. You can use the File Plugin from the Forge to get the binary passing in the image URI.

Hi Aurélio, 

Which of the types of the outsystems image widget is "Binary Data"?  

- External ;

- Static; 

- Database. 

Thanks

Graça 



Maria da Graça Peixoto wrote:

Hi Aurélio, 

Which of the types of the outsystems image widget is "Binary Data"?  

- External ;

- Static; 

- Database. 

Thanks

Graça 



If you click on the Type field of the Image widget, it has 3 types - "Local Image, External URL and Binary Data". 


So in terms of terminology mentioned by you, Database = Binary Data. (Provided database has it saved as a binary data and not a URL)


Aurelio Santos wrote:

Hi Bharath,

A suggestion is to set the "Type" property of the Image widget to "Binary Data", and pass to it the binary data of your picture. You can use the File Plugin from the Forge to get the binary passing in the image URI.

Hi Aurelio,

That seems like a lot of work to accomplish a simple task. I'm surprised the Image widget cannot directly use a local file URI as source.

I did try it but the File Plugin gives me an error when I pass the File URI - "Failed to get binary datawindow.resolveLocalFileSystemURI" is not a function.