Global variable binary type.

Hi All,



I want to create a variable globally and want to store binary data into that variable,

Client variables do not allow to do so for binary data, is tehre any other way handle this?


Can anyone pelase?



Regards,

Dhiraj M.

Hi Dhiraj,

I hope you are doing well.

Could you please explain a bit better what is the use case? Using global variables as binary is not a good practice but please let us know better what is your use case.

Thank you,

Kind Regards

Miguel Vicente wrote:

Hi Dhiraj,

I hope you are doing well.

Could you please explain a bit better what is the use case? Using global variables as binary is not a good practice but please let us know better what is your use case.

Thank you,

Kind Regards


Hi Miguel Vicente;


I am setting an image as profile picture, everytime i come to my profile screen, i have to donload the image from the server.

Is there any way i can store image globally or can cache the image and can get it easily when needed.



Regards,

Dhiraj Manwani.

Hi Dhiraj,

You have 2 options here. 

1) (The best one) You could have a DataAction and inside a server action that you could cache to have the profile pic.

2) Using javascript local storage and create 2 client actions for set and get is another possible scenario. 

However, if you are only using that approach for the profile pic it is not so bad but please check if you couldn't use the ones above. 

Thank you
Kind Regards