Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to convert IFormFile to IBrowserFile or vice versa?

$
0
0

My Blazor application has both UI and API endpoints, I am trying to write a common method for handling user uploaded files, Methoed accepts the file and converts and returns the content as string.

The problem is that API endpoint takes IFormFile whereas the UI takes IBrowserFile, I am not able to convert them to a common type in order to write a generic method.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>