- 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)
-
0
Hi @nhontran
ABP Framework has many core changes for
IRemoteStreamContent
after3.3.2
version. The following steps may not work properly.You can just replace the dto objects that has
byte[]
property to anIRemoteStreamContent
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 acceptIFormFile
.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? -
0
Hi @cotur, thanks for the info, I will try it.
regarding the downloading issue, yes, it happens when I use File Management module
-
0
Actually, the problem is really big.
At the
3.3.2
version, we are not usingstream
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.
-
0
Hi @cotur, the downloading issue happens on the latest version 4.3.2 as I mentioned above.
-
0
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...? -
0
Hi @cotur, I am using Database for BLOB storing.
-
0
check out https://stackoverflow.com/a/62555240/1767482
-
0
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.
-
0
Hi @cutor, thanks for the answer, I will explore the other options.