[Web] Upload.content cannot get any binary data

Hello,

In this case, I want to upload an excel file in a PopUp. But whenever I tried to upload it. it always return this error 

I've debugged this Action and I realized that when I wanted to use excel to record list, it couldn't get any binary data from this widget. This is the properties of my upload widget

and I've assigned FileToUpload.content in my excel to record list widget in my screen Action. Why is this happening? Feel free to ask me if I am being unclear in this question. Thank you so much.


Regards,

Hentry

hi hentry,

did that excel contain records?....please refer this link for it https://success.outsystems.com/Documentation/10/Developing_an_Application/Design_UI/Inputs/Enable_End-Users_to_Upload_Files


Regards

Amreen

Hi Amreen,


Yeah the excel contain record. This is the snipped of my excel that I tried to upload

Even when I just tried to check if the FileToUpload.content has any content inside, it showed me that the variable contains no file at all after I upload it.

Hi Hentry,

Your button method must be set to 'Submit'. I think in your case it is set to 'Ajax Submit'.

Can you make sure and reply back?

Kind regards,

Nordin

Hi Nordin,

Sorry for my late reply. My On Click Method is 'Submit' from the start. Here's the snipped

I've used this widget couple times in the past and never had this problem. That's why I am really confused right now why it doesn't work. ahahaha

Hi Hentry,

Can you maybe share your oml so I can have a look? It should be something silly haha

Kind regards,
Nordin

Hi Nordin,

I'm really sorry because I can't share the .oml. But I think this problem has to do with its placement, whether its in PopUp or in a normal screen. I just tried it in normal screen and it works perfectly. But when it's in a pop up like my first screenshot, it contains no value. So can I assume that this upload widget cannot work in pop up at all? or there are other way to make it work?

ahhh nevermind. I just find the solution for this upload file in pop up.

the link is here

https://www.outsystems.com/forums/discussion/17828/popup-upload-widget/


Anyway, thank you to all of you that were trying to help me in this matter. I am really appreciate it.


Regards,

Hentry

Solution

Hi Hentry,

Indeed, I was about to refer you to that same post.

Of course you could also use a Modal widget (from Webpatterns or OutsystemsUI) like in this example: 

It's much easier as the Modal looks the same as a Popup and is also on the same webscreen as your Upload button which makes it somewhat easier to implement.

Kind regards,
Nordin

Solution

Hi Nordin,

Thank you so much for your suggestion. I'll go check it out.

Cheers

You're welcome Hentry. Feel free to ask any additional question(s) you might have.

Kind Regards,
Nordin