I used version 3.3.0 and uploaded my logo file a month ago. I wonder where it is stored?
Recently, I download version 3.4.0 and started my project from scratch. When I start run it at first time, my old logo showed on the Login page. I know I can still use it or overwrite it by uploading a new logo again, but I want to know how it happens. I searched the whole package, but no clue.
Can you tell me where the logo file is stored?
Thanks,
4 Answer(s)
-
0
Hi,
It is stored in database, in the BinaryObjects table. You can check it's code here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Controllers/TenantCustomizationController.cs#L37">https://github.com/aspnetzero/aspnet-ze ... ler.cs#L37</a>.
Thanks.
-
0
I found it. It is stored in database table AppBinaryObjects, and linked to AbpTenants.LogoId.
In my application, I need to use multiple Logos within same tenant on different pages or under different conditions. I think I need to upload multiple Logo files onto AppBinaryObjects and dynamically change the value of AbpTenants.LogoId. I guess I have to modify the code to implement. Can you tell me which code files should be modified?
Thanks,
-
0
Hi,
This is the code for uploading logo <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Controllers/TenantCustomizationController.cs#L37">https://github.com/aspnetzero/aspnet-ze ... ler.cs#L37</a>.
You can change it according to your needs.
Thanks.
-
0
Got it, Thank you! It is in Web.Core.Controllers in my template.
First of all, I need to change the AppBinaryObjects.Id from type of GUID to Int, in order to easy manipulate. As my test, if I assign AbpTenants.LogoId directly in database by:
update AbpTenants t set t.LogoId=(select top 1 Id from AppBinaryObjects b where b.TenantId=t.Id)
The Logo shows an error (a small square no image). I think it is a little tricky to assign an GUID to LogoId. I just wonder if there is any particular reason to use GUID as AppBinaryObjects.Id?
Thanks,