formcycle 8.3.6 - JavaScript for forms
    Preparing search index...

    An AJAX upload file item, as used by the AJAX upload manager.

    interface FileItem {
        arrayBuffer: () => Promise<ArrayBuffer>;
        blob: () => Promise<Blob>;
        dataUrl: () => Promise<string>;
        field: () => JQuery;
        lastModified: number;
        name: string;
        size: number;
        state: FileItemState;
        success: () => Promise<void>;
        text: () => Promise<string>;
        type: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    arrayBuffer: () => Promise<ArrayBuffer>

    Type declaration

      • (): Promise<ArrayBuffer>
      • Returns Promise<ArrayBuffer>

        A promise for an array buffer with the file data.

    blob: () => Promise<Blob>

    Type declaration

      • (): Promise<Blob>
      • Returns Promise<Blob>

        A promise for a blob with the file data.

    dataUrl: () => Promise<string>

    Type declaration

      • (): Promise<string>
      • Returns Promise<string>

        A promise for a data URL (e.g. base64) with the file data.

    field: () => JQuery

    Type declaration

      • (): JQuery
      • Returns JQuery

        The DOM element of the upload form field.

    lastModified: number

    UNIX timestamp with the last time the file was modified.

    name: string

    The name of the file.

    size: number

    The size in bytes of the file's data.

    The current state of the AJAX upload.

    success: () => Promise<void>

    Type declaration

      • (): Promise<void>
      • Returns Promise<void>

        A promise that is resolved when the upload was transmitted to the server successfully, and rejected otherwise.

    text: () => Promise<string>

    Type declaration

      • (): Promise<string>
      • Returns Promise<string>

        A promise for the text string with the file data. This interprets the file data with the UTF-8 encoding.

    type: string

    The content type of the file.