Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FileSystemUploadFileOptions.TempFile Property

Gets a temporary file.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll

#Declaration

C#
public FileInfo TempFile { get; }

#Property Value

Type Description
FileInfo

The temporary file.

#Remarks

In the example below, the CloudBlockBlob.UploadFromFile method gets a temporary file’s full name as a parameter to upload this file to the Blob service.

Refer to the Azure Server-Side Binding online demo to get the whole example code.

public class MyFileSystemProvider : IFileUploader {
    public void UploadFile(FileSystemUploadFileOptions options) {
        string destinationKey = $"{options.DestinationDirectory.Path}/{options.FileName}";
        CloudBlockBlob newBlob = Container.GetBlockBlobReference(destinationKey);
        newBlob.UploadFromFile(options.TempFile.FullName);
    }
}

#Concepts

See Also