How To Upload And Save Image Or File Using Asp.Net WebApi? – Server Side (Part 1)
In this post, i am going to explain how to upload and save image or file using Asp.Net WebApi. Key Notes regarding the code: 1. HttpResponseMessage : A HttpResponseMessage enables us to work with the HTTP convention. In straightforward words a HttpResponseMessage is a method for restoring a message/information from your activity. 2. EXIF Orientation : It changes the orientation of the picture and image captured by mobile phone. To handle this problem, refer to the below snipets. using System; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Net; using System.Net.Http; using System.Web; using System.Web.Http; namespace WebApplication1.Controllers { public class FileController : ApiController { public enum MessageType { Image = 0, File = 1 ...