I already asked here how I can read uploaded files in Web Api without the need to save them. This question was answered with the MultipartMemoryStreamProvider, but how do I get the file name with this method to derive the type of the uploaded file from it?
Kind regards
There is an example in this DotNetNuke Code here (See the
PostFile()
method).Updated based on @FilipW comment...
Get the content item you require and then access the filename property.
Something like this :