1008
Views
8
Comments
Display Image after choose image file on upload widget

Hi Community,


I want to create the condition : After I choose image in upload widget my image box have to preview image before update to database. 


But my application only display image on database, when I choose another image before I update database my image preview box is stuck.

ToDoWeb_SH.oml

Staff
Rank: #45

Hey Syahidah,

You have components on forge for that, but I never used them though.

Checkt this one and this one.

If they don't give you what you're asking, you can always use the event onchange of the file input, and assigning to an image.src the content of the file selected through javascript.

Let me know if it worked.

Cheers,

Rank: #233

Hey Henrique,

I am not an expert in Javascript, so can you please explain me how to implement that refresh action.

Thanks,

Keerthi

mvp_badge
MVP
Rank: #6

Hello Keerthi,

If you google "how to load image with javascript" you will find lots of resources teaching how to do it.
Than it is just a matter on adapt the code to use in OutSystems, in the way you want it to work.

Cheers.
Eduardo Jauch

Rank: #1970

Hello oays,

For image preview of image upload, you need to use javascript , here i have attach oml file for image upload ,this will help you perfectly, Or 

else you can check this link , This will defiantly help you :

https://www.outsystems.com/forums/discussion/34169/demo-image-preview/

Please check it once


Thank You

PropertiesExe.oml

Champion
Rank: #136

oays wrote:

Hi Community,


I want to create the condition : After I choose image in upload widget my image box have to preview image before update to database. 


But my application only display image on database, when I choose another image before I update database my image preview box is stuck.

Hi Oays,

Please try below link

https://www.outsystems.com/forge/component-overview/4081/upload-and-display-profile-image

Hope this will help :)

Thanks,

Amit Verma


Hi oays,

Please check attached OML. This will work perfectly in a way you wants

UploadImage.oml