Open Closed

File Upload In DTO Issues with Generate Proxy #9217


User avatar
0
devmahmod created

I'm using the ABP Framework with .NET Core as the backend and Angular as the frontend. When I include an IFormFile inside a DTO and then generate the Angular proxy using ABP's generate-proxy command, it results in an error in the generated proxy.

How should I handle file uploads correctly in this scenario? Should I separate the IFormFile from the DTO and send it as a separate parameter and also this makes me can't validate this file with Fluent Api Validation because now it separate parameter


1 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Hi,

    You can use IRemoteStreamContent in app service. Then follow https://github.com/abpframework/abp/issues/6384#issuecomment-739245736

    See more: https://abp.io/support/questions/1174/Incorrect-proxy-generated-for-file-upload-API-Cannot-find-name-%27StringValues%27

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.3.0-preview. Updated on May 12, 2025, 05:22