78
Views
3
Comments
default image for upload

I applied architecture canvas for my task and I want to set default image if the user didn't upload any one. Is there a way to do this without using default attribute for the image attribute?

2021-06-02 20-50-04
Márcio Carvalho

When creating the record on the server side(or even on the client if you want), you assign the image(a default) you want if the image attribute is empty.

In this case, the BinaryDataVar or other kinda of variable, even from the aggregate, will be used on a client action or on server action to check if is empty, and if it is you assign the default image to the structure which will be used on the create(OrUpdate) entity action

UserImage.jpg
Mohamed Zakaria

Hello Marcio,

The default image is in the core widget as shown

And the server actions is in another module what should I assign here to the image attributes?

2024-09-17 18-14-33
Miguel Defavari da Silva

Hello guys,

You can add this image as a resource in the Data layer, this in the second module:

Then you can use the binary content on assigns:

Best regards,

Miguel

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