Starts in:
2 DAYS
0 HR
36 MIN
47 SEC
Starts in:
2 D
0 H
36 M
47 S
Open Closed

Unable to download large file #1528


User avatar
0
nhontran created
  • ABP Framework version: v3.3.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Hi, I am using Abp version 3.3.2, I have checked the code, it does not support upload/download content using stream, is there a way to override it to using stream same as 4.x version, how many files we need to override, could you please guide me the steps?

Another issue I found when trying Abp version 4.3.2, the downloaded file size is 0kb when downloading the large file (around ~500mb and above), there is no exception in the logs.


9 Answer(s)
  • User Avatar
    0
    cotur created

    Hi @nhontran

    ABP Framework has many core changes for IRemoteStreamContent after 3.3.2 version. The following steps may not work properly.

    You can just replace the dto objects that has byte[] property to an IRemoteStreamContent object with the stream. Most of ABP API's support stream and byte array, you can create extra app service methods to accept stream, also you need to create controller so you can accept IFormFile.

    For the newest version of abp, the IRemoteStreamContent fully supported, you don't need to override anything or create any extra controller etc.

    I need to more information about your second issue, how the download process goes? This happens while you use File Management module?

  • User Avatar
    0
    nhontran created

    Hi @cotur, thanks for the info, I will try it.

    regarding the downloading issue, yes, it happens when I use File Management module

  • User Avatar
    0
    cotur created

    Actually, the problem is really big.

    At the 3.3.2 version, we are not using stream objects from backend, so the Angular UI tries to get all byte content then it converts the object to a downloadable file in memory.

    The root of the problem may be anywhere. :\ Http request may become closed (500 mb is so big) or memory problems etc.

    When you update backend for stream using, your download process will become broken also, because as I said, angular gets the byte content then converts it.

    For the latest version Blazor WASM & Angular, whole download process handled by backend. We create a unique token for one download request etc. There are so many updates.

    I think the easiest way is upgrading your projects ABP Version.

  • User Avatar
    0
    nhontran created

    Hi @cotur, the downloading issue happens on the latest version 4.3.2 as I mentioned above.

  • User Avatar
    0
    cotur created

    Oh, there was no version decleration before or I missed it.

    Thanks for informing us about the problem, we will start to test it.

    I need one more information, which provider do you use for BLOB Storing? Database, file, azure...?

  • User Avatar
    0
    nhontran created

    Hi @cotur, I am using Database for BLOB storing.

  • User Avatar
    0
    alper created
    Support Team Director

    check out https://stackoverflow.com/a/62555240/1767482

  • User Avatar
    0
    cotur created

    We don't support streaming for Blob Storage DB provider. Because the EF Core does not support streaming from database. We have api for streams but DB Provider reads all the bytes then it returns them with a memory stream.

    If you thing that you will store big files, you can use other providers instead of Db Provider.

  • User Avatar
    0
    nhontran created

    Hi @cutor, thanks for the answer, I will explore the other options.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06