AjaxUploader
Search Results for

    Show / Hide Table of Contents

    Class UploadedFile

    A stored uploaded file exposed through a control's Items collection, with the data-access operations attached.

    Inheritance
    object
    UploadedFile
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: AjaxUploader.Models
    Assembly: AjaxUploader.dll
    Syntax
    public class UploadedFile
    Remarks

    This is the v4 AttachmentItem usage shape (FileName / FileSize / OpenStream / CopyTo) on the modern API. Upgraded pages enumerate the uploaded batch from a button handler - attach to an email, import a CSV, move files - and before this existed the modern controls offered only UploadedFileGuids, leaving the data reachable only by knowing about UploadService.

    Properties

    ContentType

    Gets the detected content type.

    Declaration
    public string ContentType { get; }
    Property Value
    Type Description
    string

    FileGuid

    Gets the stored file GUID.

    Declaration
    public Guid FileGuid { get; }
    Property Value
    Type Description
    Guid

    FileName

    Gets the original file name.

    Declaration
    public string FileName { get; }
    Property Value
    Type Description
    string

    FileSize

    Gets the file size in bytes.

    Declaration
    public long FileSize { get; }
    Property Value
    Type Description
    long

    RelativePath

    Gets the sanitized folder-relative path for folder uploads, or null.

    Declaration
    public string RelativePath { get; }
    Property Value
    Type Description
    string

    Methods

    CopyTo(string)

    Copies the stored file to destinationPath, leaving the stored copy in place.

    Declaration
    public void CopyTo(string destinationPath)
    Parameters
    Type Name Description
    string destinationPath

    GetTempFilePath()

    Returns the stored file's full temp path, or null for non-file-system providers.

    Declaration
    public string GetTempFilePath()
    Returns
    Type Description
    string

    MoveTo(string)

    Moves the stored file to destinationPath, removing it from temporary storage.

    Declaration
    public void MoveTo(string destinationPath)
    Parameters
    Type Name Description
    string destinationPath

    OpenStream()

    Opens the stored file's data for reading. The caller is responsible for disposing the returned stream.

    Declaration
    public Stream OpenStream()
    Returns
    Type Description
    Stream
    In this article
    Back to top AjaxUploader API Reference