Uploading images using variable and without tables

Hi Everyone,

I wanted to upload images in a widget and wanted to store them in variables. There is a total of 5 widgets in which multiple images can be uploaded. I wanted to store any number of images in each of these widgets separately without a table.

Is it possible?


Thanks & Regards,

Shivya Pant

Hi Shivya, 

Yes and no. 

It is not possible to keep them in variables as binary. You would have to convert them to text (base64). But as we are talking about Web app here, the server does not keep the variables in memory between requests. So, in reality, they would be stored in the page's viewstate. 

This means that every request to the server would send all of th back to the server, and the answer would bring all of them back to the browser. 

This is not really a good solution. 

I would say keep them in database and when they are not required anymore, delete them from it. 

But if you give us more detail about what are you trying to do, we probably will be able to provide a better answer. 

Cheers 

Eduardo Jauch wrote:

Hi Shivya, 

Yes and no. 

It is not possible to keep them in variables as binary. You would have to convert them to text (base64). But as we are talking about Web app here, the server does not keep the variables in memory between requests. So, in reality, they would be stored in the page's viewstate. 

This means that every request to the server would send all of th back to the server, and the answer would bring all of them back to the browser. 

This is not really a good solution. 

I would say keep them in database and when they are not required anymore, delete them from it. 

But if you give us more detail about what are you trying to do, we probably will be able to provide a better answer. 

Cheers 


Hi Eduardo Jauch,

Thank you for your response. It is like: there is a screen in which the user can add 5 todos. Each todo is an accordion with the pictures section. User can upload pictures in each todo. Then in the next screen, we can review all the todos and then save them. So I want the pictures of each todo to be stored in a local variable so that I can transmit them to the next screen.


Thanks & Regards,

Shivya Pant

Hi Shivya, 

I don't know any performative way of doing this the way you want. 

Best solution is to save temporary to an entity and at the end of the proceeds, make them permanent. 

You can delete the not used pictures from time to time. 

Cheers. 

Eduardo Jauch wrote:

Hi Shivya, 

I don't know any performative way of doing this the way you want. 

Best solution is to save temporary to an entity and at the end of the proceeds, make them permanent. 

You can delete the not used pictures from time to time. 

Cheers. 

Hi Eduardo Jauch,

Thank you.


Regards,

Shivya Pant