The DevExpress MVC File Upload Extension allows end-users to upload files to an application server. In this demo, both client and server capabilities are used to upload an image file to the server via a callback, create the image's thumbnail, and display the thumbnail within a specific placeholder on the web page.
A callback for file upload is initiated by using the Upload Extension’s Upload client method - called in response to a button click. In order to process callbacks properly, the Upload Extension's CallbackRouteValues property is used to specify the path to a controller action used to handle a callback request. In the action's implementation, the UploadControlExtension.GetUploadedFiles static method with specific parameters is used to process the uploaded file. One of the parameters identifies a delegate method that receives the FileUploadCompleteEventArgs argument. Using this argument, the delegate method implements all the logic to save the uploaded file (using the e.UploadedFile.SaveAs method) and display its thumbnail in a placeholder.