
Var physicalPath = Path.Combine(appRoot, "SavedFiles", fileName) or some other location on your hard drive.


Commonly, you may want to use the wwwroot folder through WebRootPath For portability, this will be in the application folder.

Var fileName = Path.GetFileName(().Trim('"')) Only the file name is of interest here. Some browsers send file names with a full path. Var fileContent = ContentDispositionHeaderValue.Parse(file.ContentDisposition) Public async Task SaveAsync(IEnumerable files) Public ResizeFileController(IHostingEnvironment env) needed to get the application root path public class ResizeFileController : Controller The controller is expected only to save the file but you may also add server resizing logic to ensure that the file matches the project requirements. The following example demonstrates how to configure the controller. Replace the original files with the new files.ĭata.rawFile = new File(, data.name) Var files = $("#files").data("kendoUpload").getFiles() Note that the file size that is shown by the Upload will therefore be wrong. A timeout so you do not break the built-in features and throw errors.

How can I resize the photos before they are uploaded to reduce the amount of time it takes to upload them? Is it possible to resize the photos by using JavaScript and the Upload? Solution I am using the Upload for uploading photos that were taken with a phone. Upload for Progress® Telerik® UI for ASP.NET Core Download free 30-day trial Resize Images before Upload Environment Product
