Skip to main content
All docs
V26.1
  • IFileUploader.UploadFile(FileSystemUploadFileOptions) Method

    Uploads a file to a file system.

    Namespace: DevExtreme.AspNet.Mvc.FileManagement

    Assembly: DevExtreme.AspNet.Core.dll

    Declaration

    void UploadFile(
        FileSystemUploadFileOptions options
    )

    Parameters

    Name Type Description
    options FileSystemUploadFileOptions

    Options realted to the operation.

    Remarks

    The following example illustrates how to overwrite the UploadFile method.

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

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