Webapi formdata upload (to DB) with extra parameters
Expanding on gooid’s answer, I encapsulated the FormData extraction into the provider because I was having issues with it being quoted. This just provided a better implementation in my opinion. public class MultipartFormDataMemoryStreamProvider : MultipartMemoryStreamProvider { private readonly Collection<bool> _isFormData = new Collection<bool>(); private readonly NameValueCollection _formData = new NameValueCollection(StringComparer.OrdinalIgnoreCase); private readonly Dictionary<string, Stream> _fileStreams … Read more