Open Closed

After upgrade to v7.3 SaveAsync(fileName, stream) to file saves 0 bytes #5475


User avatar
0
maxim@kolychev.msk.ru created
  • ABP Framework version: v7.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: No Exception

Code In DocManager Class:

`

    private readonly IBlobContainer _docContainer;   
    ...

    public async Task SaveFileAsync(string fileName, Stream stream, bool overrideExisting)
    {
        //await _docContainer.SaveAsync(fileName, stream, overrideExisting: overrideExisting);
        //Work fine with abp v7.2.2
        //After upgrade to abp v7.3 save 0 bytes

        var content = await stream.GetAllBytesAsync();
        await _docContainer.SaveAsync(fileName, content, overrideExisting: overrideExisting);
        //Work fine!
    }`

Code in DomainModule class

    Configure<AbpBlobStoringOptions>(options =>
    {
        options.Containers.ConfigureDefault(container =>
        {
            container.UseFileSystem(fileSystem =>
            {
                fileSystem.BasePath = configuration["App:BlobBasePath"] ?? DocumentConsts.DefaultBlobBasePath;
            });
        });
    });

1 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hi,

    I am not able to reproduce this is my code. i tried this in 7.2.0 and after i update my project to 7.3.0 version.

    can you try to reproduce this on a newly created solution of 7.3.0 version from abp suite?

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 13, 2025, 04:08