How to make validation of upload widget?
Application Type
Traditional Web

Hi, How can I make a validation of upload widget? I want to file be only image. 

Hello

"At least, with the system Upload, I think only on the server-side.
Don't have any example, but when you reach the server (button has to be submitted to the file to be sent), you can check the Upload in the server, as the properties like the File Content and the File name are available, and you then can check if the file name finishes with ".xlsx" and proceed accordingly.

Cheers."

You have in this link a lot of discussions and solutions about this.

And you have more documentation:

https://success.outsystems.com/Documentation/How-to_Guides/Logic/How_to_validate_file_input_on_a_File_Upload_Widget_in_a_Traditional_Web_App

This one is more completed!! :)

Álso I will share my oml version of the solution! :)

A little explanation!

what I did first was taking the type, every image uploaded as image/"jpeg or png, etc.."

Then after i took the first word until the limiter "/" i compared if it is image or not 

To finish, I send a feedback message saying if its an image or not 

Regards,

Márcio C.


ValidateImage.oml

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