Activities of "liangshiwei"

Hi.

It looks not a problem with ABP, but Blazor: See: https://github.com/dotnet/aspnetcore/issues/38842#issuecomment-1342540950

You can try this:

Configure<HubOptions>(options =>
{
    options.DisableImplicitFromServicesParameters = true;
});

We will fix it, your ticket refunded.

For now, you can try:

[ExposeServices(typeof(DynamicWidgetMarkdown))]
public class MyDynamicWidgetMarkdown : DynamicWidgetMarkdown
{
    [Inject]
    protected IOptions<AbpRemoteServiceOptions> RemoteServiceOptions { get; set; }

    protected override async Task OnImageUploadChangedAsync(FileChangedEventArgs e)
    {
        try
        {
            if (e.Files.Length > 1)
            {
                return;
            }

            foreach (var file in e.Files)
            {
                UploadImages[file.Id] = new MemoryStream();
                await file.WriteToStreamAsync(UploadImages[file.Id]);

                if (!Value.IsNullOrWhiteSpace())
                {
                    await MarkdownRef.SetValueAsync(Value.Replace("Placeholder.jpg", string.Empty));
                }
            }
        }
        catch (Exception exception)
        {
            await HandleErrorAsync(exception);
        }
    }

    protected override async Task OnImageUploadEndedAsync(FileEndedEventArgs e)
    {
        using (var stream = UploadImages[e.File.Id])
        {
            stream.Position = 0;
            var result = await MediaDescriptorAdminAppService.CreateAsync(BlogPostConsts.EntityType, new CreateMediaInputWithStream
            {
                Name = e.File.Name,
                File = new RemoteStreamContent(stream, e.File.Name, e.File.Type)
            });

            var baseUrl = RemoteServiceOptions.Value.RemoteServices.GetConfigurationOrDefaultOrNull(CmsKitAdminRemoteServiceConsts.RemoteServiceName).BaseUrl;
            e.File.UploadUrl = $"{baseUrl}/api/cms-kit/media/{result.Id}Placeholder.jpg";

            UploadImages.Remove(e.File.Id);
        }
    }
}

Hi,

I will check it

Could you try to run it in an emulator? As you know, I can't operate your physical device in the meeting, it's hard to find the problem

It's working for me

Will it work if you run an MAUI-Blazor app without ABP?

It may be related to your local environment, you can try it on a new computer.

Hi,

I'd like to check it remotely, can we have a meeting? shiwei.liang@volosoft.com

1

Please make sure the AbpLicenseCode exists in your appsettings.json or appsettings.secrets.json file.

You can create a new project to copy it.

2

You need to restore the NPM packages. run abp install-libs in the project folder to restore and publish the project again.

Hi,

Could you share the full error log? thanks.

ok

Hi,

Ok, so you need to configure it in the test project. for example: https://github.com/abpframework/abp/blob/dev/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo/Abp/BlobStoring/Azure/AbpBlobStoringAzureTestModule.cs#L42

Showing 301 to 310 of 2428 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 22, 2025, 10:44