Starts in:
2 DAYS
4 HRS
49 MIN
49 SEC
Starts in:
2 D
4 H
49 M
49 S

Activities of "hinairusu"

Hello!

That's up and working, thank you very much.

No idea what I was doing wrong before, but copying directly as you have above and replacing the Identity with Directory has worked

This has however broken my swagger:

Hi Team.

Apologies testing this has taken so long. In theory, this does indeed do what I need, as I can now access the file data withou the user being logged in.

But as a consiquence, you can also access everything in the entire system. One tester managed to delete the entire set of test users, including the admin user.

While it does do what was asked, there is absolutely no way this could ever be released into production.

Are there any alternatives?

Ah, thank you! Yes, this can be marked as closed.

I really apprecaite the help.

Hi Anjali,

That's fixed it, thank you! No idea why it worked locally but wasn't in the container, but now everything is displaying as expected. Now I'm going to go and figure out how to set my new theme as the default, and away we go!

Thank you for your help, it's much appreciated!

Hi Jfistelmann,

I've uploaded it here so you can see: https://sentimentary.com/

Change the theme to Comfort and you can see the behaviour.

That's the error being shown.

Generated a brand new single layer MVC application, ran the DB seeder through suite, and no admin account has been generated.

Tried running the DB Migrations manually, no admin account present.

Makes setting things up rather difficult!

In fact, it looks like nothing has seeded at all (no admin roles, or anything)

Edit: Looks like if you press "no" to the initial seeding, it won't seed. You then need to add a new CRUD for it to seed the data inside.

Makes me concerned as to how it'll seed the data when it's deployed to a live DB - as it doesn't have a DBMigrator shipped with it. I would have expected it to do it out of the box on launch.

The way I'm currently implementing fetching and displaying the items would require me to override both IFileDescriptorAppService and IDirectoryDescriptorAppService - so I really hope there is a cleaner way to do it.

My current page is shown below

`<img id="ItemPreview" class="card-img-top img-fluid" src="data:image/jpeg;base64,@ImgBytes">
<p> The test item is shown above for your consideration. </p>

@code {
[Parameter]
public string FileName { get; set; }
private string ImgBytes { get; set; }
private string Type { get; set; }

[Inject]
private IFileDescriptorAppService FileDescriptor { get; set; }

[Inject]
private IDirectoryDescriptorAppService DirectoryDescriptor { get; set; }

PagedResultDto<DirectoryContentDto> UserDirectory;

DirectoryContentDto ImageObj;

protected override async Task OnInitializedAsync()
{
    try
    {
        var UsersDirectoryInfo = DirectoryDescriptor.GetListAsync(null).Result.Items.First(s => s.Name.Equals("User Images")).Id;
        var request = new DirectoryContentRequestInput() { Id = UsersDirectoryInfo };
        UserDirectory = DirectoryDescriptor.GetContentAsync(request).Result;
        ImageObj = UserDirectory.Items.First(s => s.Name.Equals(FileName));
        try { Type = ImageObj.Name.Split('.').Last(); } catch { }
        ImgBytes = Convert.ToBase64String(FileDescriptor.GetContentAsync(ImageObj.Id).Result);

    }
    catch
    {
        Console.WriteLine("Sadly, An exception has occurred.");
        if (string.IsNullOrWhiteSpace(FileName))
            Console.WriteLine("It would appear the file name is empty or defaulted.");
        else if (UserDirectory is null)
            Console.WriteLine("The user directory does not exist!");
        else if (!UserDirectory.Items.Any())
            Console.WriteLine("There are no items in the directory, so we cannot display them");
        else if (ImageObj is null)
            Console.WriteLine($"Image object appears to be null, so we can't fetch it's data. Excpected File Name: {FileName}");
        else
            Console.WriteLine("We are looking into why this has occurred.");
    }
}
public void RefreshMe()
{
    StateHasChanged();
}
}

However this only works if the user is logged in.

Hi,

Please check this https://stackoverflow.com/questions/65818669/temporarily-grant-permissions-in-abp-framework

Thanks,

Sorry Anjali, I'm afraid that doesn't help that much.

The accepted answer there is to create a new AppService with which to override the existing one. That's exactly what I'm asking for here. I don't know how the service is working under the hood to recreate it.

The final goal of all this is for users to be able to upload a file using File Management, then for the public facing website to be able to display the images uploaded in this manner for people who are not logged in.

I've been trying to figure out how EShopOnAbp is managing it, but I feel like I've missed a step somewhere. I've got the files uploaded into the File Management, but I can't path a URL to them. When I try accessing the file directly via the GET, it requires authorisation.

Hence my request. Because I can fetch the stream out from the FM App Service if it's logged in and display it, but not for users who don't have an account

Wonderful, Thank you very much.

last question I have (And i really hope it is the last one!) When I've tested locally using run, everything is working without a problem. When I build the docker image however and push it into prod, the CSS isn't being loaded - looks like the CSS can't be found.

I can't find any CSS other than the Global-Styles.css in the docker image. Why is there a difference, and what do I need to update to make it work as expected?

Followup question.

In my update to the CSS, it appears that the BrandingProvider is no longer replacing the project logo in the new theme:

Where is the config on this one?

Showing 11 to 20 of 82 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06