hi
If the current tenant is not the host, you need to enable it on the tenant side.
Thanks.
You also need to configure the backend limit.
Log.Information("Starting Uploadtest.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.ConfigureKestrel(o =>
{
o.Limits.MaxRequestBodySize = 2L*1024 * 1024 * 1024;
});
builder.Services.Configure<FormOptions>(o =>
{
o.MultipartBodyLengthLimit = 2L*1024 * 1024 * 1024;
});
是的, 你可以这样试试
private async Task<AppFileDescriptorDto> UploadFileAsync(IBrowserFile file)
{
// using (var ms = file.OpenReadStream(2L*1024*1024*1024))
// {
// return await UpFilesAppService.UploadFileAsync(new RemoteStreamContent(ms, file.Name, file.ContentType));
// }
await using (var stream = file.OpenReadStream(MaxUpFileFsFileUploadSize))
{
using (var content = new MultipartFormDataContent())
{
using (var fileContent = new StreamContent(stream))
{
fileContent.Headers.ContentType = new MediaTypeHeaderValue(file.ContentType ?? "application/octet-stream");
content.Add(fileContent, "input", file.Name);
using var request = new HttpRequestMessage(HttpMethod.Post, "https://localhost:44362/api/app/up-files/upload-file");
var token = await AccessTokenProvider.GetTokenAsync();
if (!token.IsNullOrWhiteSpace())
{
request.SetBearerToken(token);
}
request.Content = content;
request.SetBrowserRequestStreamingEnabled(true);
using var response = await new HttpClient().SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
response.EnsureSuccessStatusCode();
var dto = await response.Content.ReadFromJsonAsync<AppFileDescriptorDto>();
return dto!;
}
}
}
}
hi
This is most likely because the distributed event bus isn't working properly.
SaasService will publish a TenantCreatedEto event, and IdentityService will create the admin for the new tenant.
Can you check the logs of IdentityService?
Thanks.
hi
Do not open-source your repository, please make it private and invite me as a contributor.
https://github.com/maliming