@nextcloud/dialogs
    Preparing search index...

    Interface DataTransferItem

    The DataTransferItem object represents one drag data item.

    MDN Reference

    interface DataTransferItem {
        kind: string;
        type: string;
        getAsFile(): null | File;
        getAsString(callback: null | FunctionStringCallback): void;
        webkitGetAsEntry(): null | FileSystemEntry;
    }
    Index

    Properties

    kind: string

    The read-only DataTransferItem.kind property returns the kind–a string or a file–of the DataTransferItem object representing the drag data item.

    MDN Reference

    type: string

    The read-only DataTransferItem.type property returns the type (format) of the DataTransferItem object representing the drag data item.

    MDN Reference

    Methods

    • If the item is a file, the DataTransferItem.getAsFile() method returns the drag data item's File object.

      MDN Reference

      Returns null | File

    • The DataTransferItem.getAsString() method invokes the given callback with the drag data item's string data as the argument if the item's DataTransferItem.kind is a Plain unicode string (i.e., kind is string).

      MDN Reference

      Parameters

      Returns void

    • If the item described by the DataTransferItem is a file, webkitGetAsEntry() returns a FileSystemFileEntry or FileSystemDirectoryEntry representing it.

      MDN Reference

      Returns null | FileSystemEntry