Ajax Handlers possibilities

Ajax Handlers possibilities

  

Hi everyone,


I need to build a file uploader and so far we found a way of doing it but we can't catch the exceptions.

  • Current Solution
    • For now we use a jquery file uploader where the action handler is a web screen. In the preparation the logic is executed and if everything is ok the file is processed.
    • The problem is, we can't get errors or exceptions if they exists
  • Second solution
    • Using a soap service
    • How to build a result that the ajax callback can use?

Do someone has faced this problems? What solutions or approaches I have more?


Thanks in advance.


Filipe Ventura wrote:

  • Current Solution
    • For now we use a jquery file uploader where the action handler is a web screen. In the preparation the logic is executed and if everything is ok the file is processed.
    • The problem is, we can't get errors or exceptions if they exists

I'm curious about this...
Why can't you handle the exceptions?
Or what do you mean by this?

Cheers

Hi Eduardo,


The best answer for your questions is, I don't know.

Considere that I can't receive png files. In the preparation I check the file extension and finish the preparation with a, per example, "Not Accepted Type File" exception.

In the ajax callback I can't get the exception. Or I'm doing something wrong?


Regards.

In any case, if it was what I think it was...

I just tested an idea here: https://jauch.outsystemscloud.com/FileUploadIniFrame/Home.aspx?_ts=636675925229259999

What I am doing is doing the upload in a popup.

To test, press the button in the popup with and without selecting a file. You can use the same approach to tell if the submit went well or not.

The idea is to execute the upload, that must happen with a submit, in a different page, so that you don't have to "submit" your current page. The popup is nice because it simply works.

If being a "popup" is not what you really want, you can try to adapt the idea. You can clone RichWidgets and make a "popup" that do not appear as a popup, but instead, integrate seamless in your application. This way, you will be able to "submit without submitting" ;) hehe

Cheers

Eduardo,


It is possible to you to share the .oml file?


Regards.

Filipe Ventura wrote:

Eduardo,


It is possible to you to share the .oml file?


Regards.

Sure! :)

Here it is.
Hope it can help you.

Cheers.