Upload Widget change widget's behavior

I'm on OS 11, using Upload Widget Reactive.

The question is:

If I add file A then file B and add file A again. A message appears saying "file A is already added" (because I have an onchange check to see if there are the same names.)

But if I add file A, and I reselect file A it doesn't show this message... but the client wants this message to appear.


Are there any tips to change the widget's behavior?



mvp_badge
MVP

Hi Mariana,

Refer the below-mentioned post link addressing the similar use case.

Forum Post link:  https://www.outsystems.com/forums/discussion/59369/is-it-posible-to-add-option-to-delete-cache-on-upload-widget-on-mobille/#Post226516


  • At the end of the Upload widget OnChange action flow, add a JavaScript node with the below-mentioned JavaScript to reset the upload input (Of File type) value to null.
document.querySelector("#" + $parameters.UploadWidgetId + " > input[type=file]").value = null;


I hope this helps you!


Kind regards,

Benjith Sam

Hello Mariana,

I dont understand your issue.

Are you doing this in reactive application or tradicional?

Are you using the "upload" component or another one from forge?

I have made a little POC with I think is what you want: https://personal-xchr.outsystemscloud.com/Tests/upload

If is this please tell me that I will share re OML.

Hope it helps,

Nuno R

P.S - I just saw now that @Benjith Sam reply also, and I think is approach is also fine, but I dont know if is what you need.

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