Skip to main content
A newer version of this page is available. .
Tab

FileUploadCompleteEventArgs.UploadedFile Property

Gets the uploaded file object related to the event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public UploadedFile UploadedFile { get; }

Property Value

Type Description
UploadedFile

An UploadedFile object that represents the uploaded file related to the event.

Remarks

Use the UploadedFile property to access and manipulate an object representing the uploaded file. You can, for instance, use the object’s UploadedFile.SaveAs method, to save the uploaded file specifying the full path on the server.

Example

The following part of the ASPxUploadControl Multi-File Upload online demo illustrates the ASPxUploadControl’s capability to upload more than one file at a time.

var fieldSeparator = "|";
function FileUploadStart() {
    document.getElementById("uploadedListFiles").innerHTML = "";
}
function FileUploaded(s, e) {
    if(e.isValid) {
        var linkFile = document.createElement("a");
        var indexSeparator = e.callbackData.indexOf(fieldSeparator);
        var fileName = e.callbackData.substring(0, indexSeparator);
        var pictureUrl = e.callbackData.substring(indexSeparator + fieldSeparator.length);
        var date = new Date();
        var imgSrc = "UploadImages/" + pictureUrl + "?dx=" + date.getTime();
        linkFile.innerHTML = fileName;
        linkFile.setAttribute("href", imgSrc);
        linkFile.setAttribute("target", "_blank");
        var container = document.getElementById("uploadedListFiles");
        container.appendChild(linkFile);
        container.appendChild(document.createElement("br"));
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the UploadedFile property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also