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
Hi,
I'd like to check it remotely, can we have a meeting? shiwei.liang@volosoft.com
Hi,
Could you share the full error log? thanks.
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