Triggering upload file popup through Javascript
Application Type

Hi OutSystems community,

I hope everyone is doing well.

I'm currently using the OutSystems upload widget within an application we are developing at the moment and once a user clicks on a link, we are opening the upload window through a single line of JavaScript (the ObjectId parameter is the ID of the upload widget).

This is working properly for most of browsers/users, except for the ones using Safari on MacOS. Please remember that the user clicks on a link, which triggers a screen action. This is what we concluded so far:

  1. In case the screen action performs a server call before running the code above, the popup does no open;
  2. In case we remove the server action, everything works properly.

Has anyone faced this issue before? What are your thoughts on this?

Best regards and thanks in advance.

Ricardo Pedroso

Why are you using javascript to show the upload widget? from the given information i would assume you can just use the visibility property in outsystems.

Have you tried calling the javascript code in the 'OnAfterFetch' of the server call instead of using it in the same client action as the server call 

The problem could be originating from the fact that you are simulating a "User Interaction" using javascript( clicking a button).
Simulating a user interaction programmatically, like triggering a click event using JavaScript, is not always the same as an actual user interaction. While simulating interactions can often achieve similar outcomes, there are important differences 

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