Thank you, it worked.
Hey
I shared with you via email github repository of the test solution
regards
Ok i will share a test sample within 2 3 hours. Do you want it via email or discord or what are your steps
we are using Conventional Controllers, like the application Service. Maybe is it when you inject a scoped service and manipulate the stream from within? The blow method is part of a custom IBlobService that we created, which has a scoped life cycle. and I'm calling its method in my application service.
// IBlobService
public async Task<bool> SaveBlobAsync(IRemoteStreamContent file, CancellationToken cancellationToken = default)
{
using var memoryStream = new MemoryStream();
await file.GetStream().CopyToAsync(memoryStream, cancellationToken); // this line throwing exception since it is touching stream position of HTTP request
var fileContent = memoryStream.ToArray();
await memoryStream.FlushAsync(cancellationToken);
await blobContainer.SaveAsync(CleanFileName(file.FileName!), fileContent, true, cancellationToken);
return true;
}
// end blobService
public class MyApplicationService(IBlobService blobService) : IMyApplicationService
{
public async Task TestAsync(List<IRemoteStreamContent> files)
{
foreach(var file in files)
{
await blobService.SaveBlobAsync(file);
}
}
}
Hello maliming Thank you for your reply, but the shared example is incompatible with my use case since you separated the streams into separate objects. Please try to put them in a List<IRemoteStreamContent>, and you will see that it won't work. If you try the example CreateMultipleFileInput here https://abp.io/docs/latest/framework/architecture/domain-driven-design/application-services#miscellaneous in the documentation, you will realize that the example shared does not work. I already shared an example with you when I opened the support ticket.
I encourage you to jump on a Teams call to elaborate more about this matter. Would Monday work for you?
Hello
sorry there was an override line on Microsoft log to Information, logs shared
thanks
Debug mode did not show the FormData anything required from my side?
regards Elie
Hello
this is the full log. If you want we can schedule a Teams meeting to share my findings more in details since we are on NDA.
regards Elie
Do you have any reply? The problem is from an Extension method you created that is resetting the stream position CopyToAsync(). It is overriding the virtual method of Stream! it is resetting the position to 0 while on Http requests Asp net core itself manages the streams
Hello, Any reply? I think you guys to see it from our code itself, it is blocking our iteration. Can we have a call or something?