Open Closed

BLOB-Storing-Minio-Provider #7936


User avatar
0
limiko created
  • ABP Framework version: v8.2.2
  • UI Type: MVC
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I created a app-pro template project, and add FileManagement Module. It works fine.

Now i need use minio, i readed the https://abp.io/docs/latest/framework/infrastructure/blob-storing/minio, add minio use abp add-package Volo.Abp.BlobStoring.Minio in my HttpApi.Host project.

HttpApi.Host.csproj

...
    <PackageReference Include="Volo.Abp.BlobStoring.Minio" Version="8.2.2" />
...

appsettings.json

{
...
    "Minio": {
        "EndPoint": "127.0.0.1",
        "AccessKey": "minioadmin",
        "SecretKey": "minioadmin",
        "BucketName": "my",
        "WithSSL": false,
        "CreateContainerIfNotExists": true
    },
    ...
}

MyHttpApiHostModule.js

[DependsOn(
    ...
    typeof(AbpBlobStoringMinioModule),
    ...
    )]
public class MyHttpApiHostModule : AbpModule {
    ...
    public override void ConfigureServices(ServiceConfigurationContext context) {
        ...
        Configure<AbpBlobStoringOptions>(options =>
        {
            System.Console.WriteLine("## - 1");
            options.Containers.Configure<FileManagementContainer>(c =>
            {
                System.Console.WriteLine("## - 2");
                c.UseMinio(minio =>
                {
                    System.Console.WriteLine("## - 3");
                    minio.EndPoint = configuration["Minio:EndPoint"]!;
                    minio.AccessKey = configuration["Minio:AccessKey"]!;
                    minio.SecretKey = configuration["Minio:SecretKey"]!;
                    minio.BucketName = configuration["Minio:BucketName"];
                    minio.WithSSL = configuration.GetValue<bool>("Minio:WithSSL");
                    minio.CreateBucketIfNotExists = configuration.GetValue<bool>("Minio:CreateBucketIfNotExists");
                });
            });
        });
    }
    ...

I added a breakpoint in line System.Console.WriteLine("## - 1");, But where i run the HttpApi.Host, There is no output ## - 1 from the log, and no breakpoints are triggered.

Am I missing some steps?


19 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Your code looks like no problem, will it work if you upload a file?

  • User Avatar
    0
    limiko created

    Upload small file success, but nothing in the minio. I think configure AbpBlobStoringOptions is not triggered.

    Configure<AbpBlobStoringOptions>(options =>
    {
        // Can't enter here .....        
    }
    
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce the problem,

    could you please share a minimal project with me? i will check it. shiwei.liang@volosoft.com

  • User Avatar
    0
    limiko created

    Ok, I sended the project to your email.

    In my here, upload file success but nothing in the minio.

    <br>

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can not download the file, could you upload it to https://wetransfer.com/

  • User Avatar
    0
    limiko created

    Ok, I sended it .

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It works for me:

    My steps:

    create a minio docker

    docker run -d -p 9000:9000 --name minio\
      -e "MINIO_ACCESS_KEY=admin" \
      -e "MINIO_SECRET_KEY=admin@123456" \
      minio/minio:RELEASE.2021-06-17T00-10-46Z server /data
    

    update EndPoint to localhost:9000

    update configure code: minio.CreateBucketIfNotExists = configuration.GetValue<bool>("Minio:CreateContainerIfNotExists");

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

  • User Avatar
    0
    limiko created

    Fine, could you share the project with me? I want to test it at my machine.

  • User Avatar
    0
    limiko created

    And at my machine, Console can't print the "## - 1", so configure for minio is skiped. Is this message printed at your machine?

    Configure<AbpBlobStoringOptions>(options =>
            {
                System.Console.WriteLine("## - 1");
               
            });
    
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    shared, please check it

    And at my machine, Console can't print the "## - 1", so configure for minio is skiped. Is this message printed at your machine?

    yes

  • User Avatar
    0
    limiko created

    It works right now.

    I mistakenly thought that it would be configured after the program started running, but it would only be configured when I actually accessed FileManagement :(

    A new issue happened when i upload a large file.

    [23:00:19 WRN] ---------- RemoteServiceErrorInfo ----------
    {
      "code": null,
      "message": "文件太大,最大文件大小限制为 2 GB。",
      "details": null,
      "data": {},
      "validationErrors": null
    }
    
    [23:00:19 WRN] 文件太大,最大文件大小限制为 2 GB。
    Volo.Abp.UserFriendlyException: 文件太大,最大文件大小限制为 2 GB。
       at Volo.FileManagement.Files.FileDescriptorAppService.CheckSizeAsync(Int64 contentLength)
       at Volo.FileManagement.Files.FileDescriptorAppService.GetPreInfoAsync(List`1 input)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
       at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync(List`1 input)
       at lambda_method3119(Closure, Object)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    

    I already added follow code.

        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration = context.Services.GetConfiguration();
    
            Configure&lt;FormOptions&gt;(x =>
            {
                x.MultipartBodyLengthLimit = 1024L * 1024 * 1024 * 10; //10G
                x.ValueLengthLimit = int.MaxValue;
            });
            Configure&lt;KestrelServerOptions&gt;(options =>
            {
                options.Limits.MaxRequestBodySize = 1024L * 1024 * 1024 * 10; //10G
            });
            ...
        }
    

    Could tell me how to resolve it ?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    you can override the CheckSizeAsync method if you want.

  • User Avatar
    0
    limiko created

    Fine, thanks! I have some questions:

    1. I created a MyFileDescriptorAppService at Application layer and override the CheckSizeAsync method, then how to inject it and replace the origin FileDescriptorAppService ?
    2. Could you share me the fully code of CheckSizeAsync method, your image just a part of it, i don't know whether has other important logic.
    3. And why the MaxSizeLength isn't a long type?
    public static class FileDescriptorConsts
    {
      public static int MaxSizeLength = int.MaxValue;
    }
    
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    HI,

    This is the full method code

    protected virtual async Task CheckSizeAsync(long contentLength)
    {
        if (contentLength > FileDescriptorConsts.MaxSizeLength)
        {
            throw new UserFriendlyException(L["FileTooBig", BeautifySize(FileDescriptorConsts.MaxSizeLength)]); ;
        }
    
        var maxSizeDescription = await FeatureChecker.GetOrNullAsync(FileManagementFeatures.StorageSize);
    
        if (maxSizeDescription == null || maxSizeDescription == "0")
        {
            return;
        }
    
        var maxSize = long.Parse(maxSizeDescription);
    
        var totalStorage = await FileDescriptorRepository.GetTotalSizeAsync();
    
        if ((totalStorage + contentLength) < maxSize)
        {
            return;
        }
    
        var remainedSize = (maxSize - totalStorage);
        throw new NotEnoughStorageSizeException(BeautifySize(maxSize), BeautifySize(remainedSize));
    }
    
  • User Avatar
    0
    limiko created

    Thanks~

    New issue happend when i upload a large file (7GB).

    the WebHost thrown:

    [19:31:43 INF] Sending HTTP request POST https://localhost:44301/api/file-management/file-descriptor/upload?Name=sd-webui-aki-v4.9.7z&OverrideExisting=True&ExtraProperties=Volo.Abp.Data.ExtraPropertyDictionary&api-version=1.0
    [19:33:23 ERR] ---------- RemoteServiceErrorInfo ----------
    {
      "code": null,
      "message": "An error occurred during the ABP remote HTTP request. (The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.) See the inner exception for details.",
      "details": null,
      "data": {},
      "validationErrors": null
    }
    
    [19:33:23 ERR] An error occurred during the ABP remote HTTP request. (The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.) See the inner exception for details.
    Volo.Abp.Http.Client.AbpRemoteCallException: An error occurred during the ABP remote HTTP request. (The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.) See the inner exception for details.
     ---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
     ---> System.TimeoutException: The operation was canceled.
     ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
     ---> System.IO.IOException: Unable to read data from the transport connection: 由于线程退出或 应用程序请求,已中止 I/O 操作。.
     ---> System.Net.Sockets.SocketException (995): 由于线程退出或应用程序请求,已中止 I/O 操作。
       --- End of inner exception stack trace ---
       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
       at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
       at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
       at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory`1 buffer, CancellationToken cancellationToken)
       at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource&lt;TResult&gt;.GetResult(Int16 token)
       at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
       at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
       --- End of inner exception stack trace ---
       at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
       at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
       at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
       at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
       at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.&lt;SendCoreAsync&gt;g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
       at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.&lt;SendCoreAsync&gt;g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
       at System.Net.Http.HttpClient.&lt;SendAsync&gt;g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
       --- End of inner exception stack trace ---
       --- End of inner exception stack trace ---
       at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
       at System.Net.Http.HttpClient.&lt;SendAsync&gt;g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
       --- End of inner exception stack trace ---
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](ClientProxyRequestContext requestContext)
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
       at Volo.FileManagement.Files.FileDescriptorClientProxy.CreateAsync(Nullable`1 directoryId, CreateFileInputWithStream inputWithStream)
       at lambda_method3403(Closure, Object)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    [19:33:23 ERR] Code:
    [19:33:23 ERR] Details:
    [19:33:23 INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
    [19:33:23 INF] Executed action Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi) in 159170.0881ms
    [19:33:23 INF] Executed endpoint 'Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi)'
    [19:33:23 INF] Request starting HTTP/2 POST https://localhost:44302/api/file-management/file-descriptor/upload - multipart/form-data; boundary=----WebKitFormBoundaryWHh4hagNOJiN39KI 7538690034
    [19:33:23 INF] Check the access_token is active every 60 seconds.
    [19:33:23 INF] The access_token is active.
    [19:33:23 INF] Start processing HTTP request GET https://localhost:44301/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0
    [19:33:23 INF] Sending HTTP request GET https://localhost:44301/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0
    [19:33:23 INF] Received HTTP response headers after 47.5971ms - 200
    [19:33:23 INF] End processing HTTP request after 47.7461ms - 200
    [19:33:23 INF] Start processing HTTP request GET https://localhost:44301/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0
    [19:33:23 INF] Sending HTTP request GET https://localhost:44301/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0
    [19:33:23 INF] Received HTTP response headers after 38.3634ms - 200
    [19:33:23 INF] End processing HTTP request after 38.5779ms - 200
    [19:33:23 INF] Executing endpoint 'Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi)'
    [19:33:23 INF] Route matched with {controller = "FileDescriptors", area = "fileManagement", action = "Create", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.FileManagement.Files.FileDescriptorDto] CreateAsync(System.Nullable`1[System.Guid], Volo.FileManagement.Files.CreateFileInputWithStream) on controller Volo.FileManagement.Files.FileDescriptorController (Volo.FileManagement.HttpApi).
    [19:33:23 INF] Request finished HTTP/2 POST https://localhost:44302/api/file-management/file-descriptor/upload - 500 null application/json; charset=utf-8 159524.6782ms
    

    the ApiHost thrown:

    [19:33:23 INF] Request finished HTTP/1.1 GET https://localhost:44301/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - 200 null application/json; charset=utf-8 38.1603ms
    [19:33:27 ERR] An error occurred using a transaction.
    [19:33:27 ERR] ---------- RemoteServiceErrorInfo ----------
    {
      "code": null,
      "message": "对不起,在处理您的请求期间产生了一个服务器内部错误!!",
      "details": null,
      "data": {},
      "validationErrors": null
    }
    
    [19:33:27 ERR] The operation was canceled.
    System.OperationCanceledException: The operation was canceled.
       at System.Threading.CancellationToken.ThrowOperationCanceledException()
       at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 15
       at MySqlConnector.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 357
       at MySqlConnector.MySqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 350
       at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
       at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
       at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
       at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
       at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
       at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
       at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
       at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Volo.FileManagement.Files.FileDescriptorAppService.CreateAsync(Nullable`1 directoryId, CreateFileInputWithStream inputWithStream)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       ...
       <InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    [19:33:27 INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
    [19:33:27 INF] Executed action Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi) in 104660.6893ms
    [19:33:27 INF] Executed endpoint 'Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi)'
    [19:33:28 INF] Request finished HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/upload?Name=sd-webui-aki-v4.9.7z&OverrideExisting=True&ExtraProperties=Volo.Abp.Data.ExtraPropertyDictionary&api-version=1.0 - 499 null application/json; charset=utf-8 105391.5284ms
    [19:34:19 INF] Request starting HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/upload?Name=sd-webui-aki-v4.9.7z&OverrideExisting=True&ExtraProperties=Volo.Abp.Data.ExtraPropertyDictionary&api-version=1.0 - multipart/form-data; boundary="2a9f04a1-b972-4f0b-8ee8-2778ca3086fe" 7538689764
    [19:34:19 INF] Executing endpoint 'Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi)'
    [19:34:19 INF] Route matched with {controller = "FileDescriptors", area = "fileManagement", action = "Create", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.FileManagement.Files.FileDescriptorDto] CreateAsync(System.Nullable`1[System.Guid], Volo.FileManagement.Files.CreateFileInputWithStream) on controller Volo.FileManagement.Files.FileDescriptorController (Volo.FileManagement.HttpApi).
    

    This large file saved at minio success, but nothing at FileManagement.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can set the HTTP Request timeout.

    BWT, I don't remember uploading a very large file like this.

  • User Avatar
    0
    limiko created

    Thanks, resolved it !

    But the Size is int type, it overflow now, how to fix this issue?

    public class FileDescriptor : AuditedAggregateRoot<Guid>, IMultiTenant
    {
        public int Size { get; protected internal set; }
    }
        
    public class FileDescriptorDto : ExtensibleAuditedEntityDto<Guid>, IHasConcurrencyStamp
    {
        public int Size { get; set; }
    }
    
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    we will consider use long type in the next version

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 17, 2025, 10:38