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

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,

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

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

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

Tanvi hanbar wrote:

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

Hi Tanvi,

Its a very old post ,

In OS11 you dont need any javascript, you just need to assign the variable to your image control which is assigned to upload control.

See the below image.

 

Regards,

Thank you tanavi . It work

Champion

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

Thanks for this helpful post.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.