Open Closed

File management module, getting 415 status on uploading file in File Management Page #2685


User avatar
0
imranStem created

I have microservice architecture and I install File Management Module in administration microservices by ABP Suite. The module is successfully installed and I can see the File management menu in Angular UI. I also give all permission. I have created two folders and when I upload the png or pdf file, I am getting a 415 error.

I also configured the azure blob storage in AdministrationServiceHttpApiHostModule module.

Logs of administration microservice.

2022-03-07 13:25:33.890 +05:30 [INF] Request finished HTTP/1.1 GET https://localhost:44301/api/file-management/directory-descriptor?id=fc2c84ea-a189-488b-0e43-3a02758d29af - 0 - 200 - application/json;+charset=utf-8 42.6268ms 2022-03-07 13:25:39.552 +05:30 [INF] Request starting HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/pre-upload-info application/json 115 2022-03-07 13:25:39.553 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.554 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.554 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.554 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.554 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.554 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.555 +05:30 [INF] Executing endpoint 'Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:39.558 +05:30 [INF] Route matched with {controller = "FileDescriptors", area = "fileManagement", action = "GetPreInfo", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[System.Collections.Generic.List1[Volo.FileManagement.Files.FileUploadPreInfoDto]] GetPreInfoAsync(System.Collections.Generic.List1[Volo.FileManagement.Files.FileUploadPreInfoRequest]) on controller Volo.FileManagement.Files.FileDescriptorController (Volo.FileManagement.HttpApi). 2022-03-07 13:25:39.575 +05:30 [INF] Executing action method Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi) - Validation state: "Valid" 2022-03-07 13:25:39.579 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.579 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.579 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.580 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.580 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.580 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:39.614 +05:30 [INF] Executed action method Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 39.4151ms. 2022-03-07 13:25:39.615 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:39.615 +05:30 [INF] Executing ObjectResult, writing value of type 'System.Collections.Generic.List1[[Volo.FileManagement.Files.FileUploadPreInfoDto, Volo.FileManagement.Application.Contracts, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null]]'. 2022-03-07 13:25:39.616 +05:30 [INF] Executed action Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi) in 57.537ms 2022-03-07 13:25:39.616 +05:30 [INF] Executed endpoint 'Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:39.616 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:39.696 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:39.697 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:39.698 +05:30 [INF] Request finished HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/pre-upload-info application/json 115 - 200 - application/json;+charset=utf-8 145.4780ms 2022-03-07 13:25:42.285 +05:30 [INF] Request starting HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/pre-upload-info application/json 115 2022-03-07 13:25:42.289 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.289 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.289 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.289 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.289 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.290 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.290 +05:30 [INF] Executing endpoint 'Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:42.290 +05:30 [INF] Route matched with {controller = "FileDescriptors", area = "fileManagement", action = "GetPreInfo", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[System.Collections.Generic.List1[Volo.FileManagement.Files.FileUploadPreInfoDto]] GetPreInfoAsync(System.Collections.Generic.List1[Volo.FileManagement.Files.FileUploadPreInfoRequest]) on controller Volo.FileManagement.Files.FileDescriptorController (Volo.FileManagement.HttpApi). 2022-03-07 13:25:42.292 +05:30 [INF] Executing action method Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi) - Validation state: "Valid" 2022-03-07 13:25:42.294 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.295 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.295 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.295 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.295 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.296 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.311 +05:30 [INF] Executed action method Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 18.9201ms. 2022-03-07 13:25:42.312 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.312 +05:30 [INF] Executing ObjectResult, writing value of type 'System.Collections.Generic.List1[[Volo.FileManagement.Files.FileUploadPreInfoDto, Volo.FileManagement.Application.Contracts, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null]]'. 2022-03-07 13:25:42.312 +05:30 [INF] Executed action Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi) in 22.1097ms 2022-03-07 13:25:42.313 +05:30 [INF] Executed endpoint 'Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:42.313 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.389 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.390 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.391 +05:30 [INF] Request finished HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/pre-upload-info application/json 115 - 200 - application/json;+charset=utf-8 105.2165ms 2022-03-07 13:25:42.415 +05:30 [INF] Request starting HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/upload?directoryId=fc2c84ea-a189-488b-0e43-3a02758d29af multipart/form-data;+boundary=----WebKitFormBoundaryKtGWHoQzMj1X60Gs 89705 2022-03-07 13:25:42.417 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.418 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.418 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.418 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.418 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.418 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor 2022-03-07 13:25:42.419 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor.Create 2022-03-07 13:25:42.419 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.FileDescriptor.Create 2022-03-07 13:25:42.419 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.FileDescriptor.Create 2022-03-07 13:25:42.419 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.FileDescriptor.Create 2022-03-07 13:25:42.419 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor.Create 2022-03-07 13:25:42.419 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.FileDescriptor.Create 2022-03-07 13:25:42.420 +05:30 [INF] Executing endpoint 'Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:42.421 +05:30 [INF] Route matched with {controller = "FileDescriptors", area = "fileManagement", action = "Create", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.FileManagement.Files.FileDescriptorDto] CreateAsync(System.Nullable1[System.Guid], Volo.FileManagement.Files.CreateFileInputWithStream) on controller Volo.FileManagement.Files.FileDescriptorController (Volo.FileManagement.HttpApi). 2022-03-07 13:25:42.437 +05:30 [INF] Executing StatusCodeResult, setting HTTP status code 415 2022-03-07 13:25:42.437 +05:30 [INF] Executed action Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi) in 15.492ms 2022-03-07 13:25:42.437 +05:30 [INF] Executed endpoint 'Volo.FileManagement.Files.FileDescriptorController.CreateAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:42.464 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.464 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.469 +05:30 [INF] Request finished HTTP/1.1 POST https://localhost:44301/api/file-management/file-descriptor/upload?directoryId=fc2c84ea-a189-488b-0e43-3a02758d29af multipart/form-data;+boundary=----WebKitFormBoundaryKtGWHoQzMj1X60Gs 89705 - 415 0 - 54.4199ms 2022-03-07 13:25:42.486 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44301/api/file-management/directory-descriptor/sub-directories - 0 2022-03-07 13:25:42.487 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.488 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.488 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.488 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.488 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.488 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.489 +05:30 [INF] Executing endpoint 'Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:42.489 +05:30 [INF] Route matched with {area = "fileManagement", controller = "DirectoryDescriptors", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.Application.Dtos.ListResultDto1[Volo.FileManagement.Directories.DirectoryDescriptorInfoDto]] GetListAsync(System.Nullable1[System.Guid]) on controller Volo.FileManagement.Directories.DirectoryDescriptorController (Volo.FileManagement.HttpApi). 2022-03-07 13:25:42.491 +05:30 [INF] Executing action method Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi) - Validation state: "Valid" 2022-03-07 13:25:42.492 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.492 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.492 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.492 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.492 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.493 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:FileManagement.DirectoryDescriptor 2022-03-07 13:25:42.513 +05:30 [INF] Executed action method Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 21.8367ms. 2022-03-07 13:25:42.514 +05:30 [DBG] Added 0 entity changes to the current audit log 2022-03-07 13:25:42.514 +05:30 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.ListResultDto1[[Volo.FileManagement.Directories.DirectoryDescriptorInfoDto, Volo.FileManagement.Application.Contracts, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null]]'. 2022-03-07 13:25:42.515 +05:30 [INF] Executed action Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi) in 25.2799ms 2022-03-07 13:25:42.515 +05:30 [INF] Executed endpoint 'Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi)' 2022-03-07 13:25:42.515 +05:30 [DBG] Added 0 entity changes to the current audit log

  • ABP Framework version: 5.1.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Yes
  • Exception message and stack trace: 415 status code while uploading png/pdf file
  • Steps to reproduce the issue:"

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

    Hi,

    Can you share the full steps to reproduce? thanks.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11