Class: AnyDrop
Defined in: ui/src/AnyDrop.ts:142
The AnyDrop UI: a drop zone with file and folder pickers, a folder tree, a toolbar, an error panel, thumbnails and a mobile layout. It extends AnyDropCore, so every core option, method and event works.
Example
const ad = new AnyDrop('#uploader', { url: '/upload', chunking: true });
ad.on('queuecomplete', () => console.log(ad.getErrors()));Extends
Constructors
Constructor
new AnyDrop(element, config?): AnyDrop;Defined in: ui/src/AnyDrop.ts:254
Attaches to an element (or a selector). Throws when there is no URL or the selector matches nothing.
Parameters
| Parameter | Type |
|---|---|
element | string | HTMLElement |
config? | AnyDropConfig |
Returns
AnyDrop
Overrides
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|---|---|
disabled | public | boolean | false | Set by disable(), cleared by enable(). | - | AnyDropCore.disabled | core/src/AnyDropCore.ts:172 |
element | readonly | HTMLElement | undefined | The element the instance is attached to. | - | - | ui/src/AnyDrop.ts:201 |
errors | protected readonly | ErrorRegistry | undefined | The error list. Protected so subclasses can read it; do not shadow it. | - | AnyDropCore.errors | core/src/AnyDropCore.ts:179 |
files | readonly | AnyDropFile[] | [] | Every file added and not removed, in add order. Do not modify. | - | AnyDropCore.files | core/src/AnyDropCore.ts:170 |
options | readonly | AnyDropCoreOptions<AnyDrop> & AnyDropUIOptions & AnyDropEventHandlers<AnyDrop> & AnyDropCoreOptions<AnyDropCore> & AnyDropEventHandlers<AnyDropCore> | undefined | Resolved options (defaults merged with yours). Change them with setOption(). | AnyDropCore.options | - | ui/src/AnyDrop.ts:199 |
tree | protected readonly | TreeStore | ... | The folder tree. Protected so subclasses (@vedratech/anydrop-ui) can read it; do not shadow it. | - | AnyDropCore.tree | core/src/AnyDropCore.ts:177 |
ACCEPTED | static readonly | "queued" | ACCEPTED | Alias of QUEUED. | - | AnyDropCore.ACCEPTED | core/src/AnyDropCore.ts:149 |
ADDED | static readonly | "added" | ADDED | Status constant 'added'. | - | AnyDropCore.ADDED | core/src/AnyDropCore.ts:145 |
autoDiscover | static | boolean | true | Read by the CDN build only: set it to false right after the script tag to stop auto-discovery. | - | - | ui/src/AnyDrop.ts:150 |
CANCELED | static readonly | "canceled" | CANCELED | Status constant 'canceled'. | - | AnyDropCore.CANCELED | core/src/AnyDropCore.ts:161 |
ERROR | static readonly | "error" | ERROR | Status constant 'error'. | - | AnyDropCore.ERROR | core/src/AnyDropCore.ts:159 |
instances | static | AnyDrop[] | [] | Every live instance (removed again by destroy()). | - | - | ui/src/AnyDrop.ts:146 |
isValidFile | static readonly | (file, acceptedFiles) => boolean | isValidFile | Whether a file passes a type list such as 'image/*,.pdf'; an empty MIME type is judged by its extension. | - | AnyDropCore.isValidFile | core/src/AnyDropCore.ts:163 |
locales | static | Record<string, AnyDropLocale> | {} | Language packs by code. The CDN files dist/locales/<code>.global.js fill it; you can register your own. | - | - | ui/src/AnyDrop.ts:148 |
options | static | Record<string, AnyDropConfig | false> | {} | Options per element id (camelCased), used when an element is attached: AnyDrop.options.myId = { ... }. | - | - | ui/src/AnyDrop.ts:144 |
PAUSED | static readonly | "paused" | PAUSED | Status constant 'paused'. | - | AnyDropCore.PAUSED | core/src/AnyDropCore.ts:155 |
PROCESSING | static readonly | "uploading" | PROCESSING | Alias of UPLOADING. | - | AnyDropCore.PROCESSING | core/src/AnyDropCore.ts:153 |
QUEUED | static readonly | "queued" | QUEUED | Status constant 'queued'. | - | AnyDropCore.QUEUED | core/src/AnyDropCore.ts:147 |
SUCCESS | static readonly | "success" | SUCCESS | Status constant 'success'. | - | AnyDropCore.SUCCESS | core/src/AnyDropCore.ts:157 |
UPLOADING | static readonly | "uploading" | UPLOADING | Status constant 'uploading'. | - | AnyDropCore.UPLOADING | core/src/AnyDropCore.ts:151 |
uuidv4 | static readonly | () => string | uuidv4 | Creates a UUID version 4. | - | AnyDropCore.uuidv4 | core/src/AnyDropCore.ts:165 |
version | static readonly | string | VERSION | Library version. | - | AnyDropCore.version | core/src/AnyDropCore.ts:143 |
Accessors
hiddenFileInput
Get Signature
get hiddenFileInput(): HTMLInputElement | null;Defined in: ui/src/AnyDrop.ts:279
The hidden <input type=file> the file picker opens.
Returns
HTMLInputElement | null
isDestroyed
Get Signature
get isDestroyed(): boolean;Defined in: core/src/AnyDropCore.ts:1145
Whether destroy() was called.
Returns
boolean
Inherited from
Methods
_addFormElementData()
protected _addFormElementData(formData): void;Defined in: ui/src/AnyDrop.ts:290
The fields of a <form> element go with every request, once.
Parameters
| Parameter | Type |
|---|---|
formData | FormData |
Returns
void
Overrides
AnyDropCore._addFormElementData
_completeExternal()
protected _completeExternal(file): void;Defined in: core/src/AnyDropCore.ts:344
Hook for subclasses: emits complete for a file outside the queue (a displayExistingFile mock file, which is in neither files nor the tree), then re-checks queuecomplete while a run is open, so it can never fire an extra queuecomplete when idle.
Parameters
| Parameter | Type |
|---|---|
file | AnyDropFile |
Returns
void
Inherited from
addDataTransfer()
addDataTransfer(dataTransfer): Promise<AnyDropFile[]>;Defined in: core/src/AnyDropCore.ts:402
Adds the contents of a DataTransfer (files and folders) as one batch, without a drop event.
Parameters
| Parameter | Type |
|---|---|
dataTransfer | DataTransferLike |
Returns
Promise<AnyDropFile[]>
Inherited from
addFile()
addFile(file, folderPath?): AnyDropFile;Defined in: core/src/AnyDropCore.ts:424
Adds one file. folderPath places it in a folder ('Photos/2024'); without it, a non-empty webkitRelativePath is used, else the file is loose. Calls in the same tick form one batch. Returns the file with its properties added.
Parameters
| Parameter | Type |
|---|---|
file | File |
folderPath? | string |
Returns
Inherited from
addFiles()
addFiles(files): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:441
Adds several files as one batch (see addFile).
Parameters
| Parameter | Type |
|---|---|
files | ArrayLike<File> | Iterable<File, any, any> |
Returns
Inherited from
addFromInput()
addFromInput(input): Promise<AnyDropFile[]>;Defined in: core/src/AnyDropCore.ts:411
Adds the files of a file or folder input (<input type=file>, <input webkitdirectory>), or a FileList, as one batch. Folder paths come from webkitRelativePath.
Parameters
| Parameter | Type |
|---|---|
input | | ArrayLike<File> | { files?: ArrayLike<File> | null; } |
Returns
Promise<AnyDropFile[]>
Inherited from
cancelFolder()
cancelFolder(path): void;Defined in: core/src/AnyDropCore.ts:633
Cancels every unfinished file under a folder (cancelUpload per file: canceled, complete), then foldercomplete fires. The files keep their tree rows.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
void
Inherited from
cancelUpload()
cancelUpload(file): void;Defined in: core/src/AnyDropCore.ts:1023
Cancels a file: aborts its requests, status canceled, then canceled and complete. With uploadMultiple, every file sharing its request is canceled.
Parameters
| Parameter | Type |
|---|---|
file | AnyDropFile |
Returns
void
Inherited from
clearErrors()
clearErrors(): void;Defined in: core/src/AnyDropCore.ts:517
Empties the error list. The files stay in error.
Returns
void
Inherited from
clearPersistedState()
clearPersistedState(): Promise<void>;Defined in: core/src/AnyDropCore.ts:645
Deletes this persistKey's resume records (a "start over" button), and the claims of the files in the list, so they stop writing records. Does nothing when persistState is false.
Returns
Promise<void>
Inherited from
AnyDropCore.clearPersistedState
copyErrors()
copyErrors(): Promise<boolean>;Defined in: ui/src/AnyDrop.ts:413
Copies the error list (JSON) to the clipboard. Resolves false when the browser refuses.
Returns
Promise<boolean>
destroy()
destroy(): void;Defined in: ui/src/AnyDrop.ts:424
Aborts every request, removes every listener and timer. The instance cannot be used again. No removedfile events are emitted.
Returns
void
Overrides
disable()
disable(): void;Defined in: ui/src/AnyDrop.ts:382
Sets disabled and cancels every file. Adding files still works.
Returns
void
Overrides
displayExistingFile()
displayExistingFile(
mock,
imageUrl,
callback?,
crossOrigin?,
resizeThumbnail?
): void;Defined in: ui/src/AnyDrop.ts:350
Shows a file that is already on the server . The mock file is not added to files, the tree, the queue or a manifest.
Parameters
| Parameter | Type | Default value |
|---|---|---|
mock | MockFile | undefined |
imageUrl | string | undefined |
callback? | (() => void) | null | undefined |
crossOrigin? | string | null | undefined |
resizeThumbnail? | boolean | true |
Returns
void
downloadErrors()
downloadErrors(format?): void;Defined in: ui/src/AnyDrop.ts:395
Downloads the error list as a file (anydrop-errors.json or .csv).
Parameters
| Parameter | Type | Default value |
|---|---|---|
format? | "json" | "csv" | 'json' |
Returns
void
drop()
drop(event): Promise<AnyDropFile[]>;Defined in: core/src/AnyDropCore.ts:386
Handles a drop event: emits drop, reads files and folders (folders through webkitGetAsEntry), and resolves with the batch's files after addedfiles. Call it synchronously from the event listener: the browser clears the items afterwards.
Parameters
| Parameter | Type |
|---|---|
event | { dataTransfer?: | DataTransferLike | null; } |
event.dataTransfer? | | DataTransferLike | null |
Returns
Promise<AnyDropFile[]>
Inherited from
emit()
emit<K>(event, ...args): this;Defined in: ui/src/AnyDrop.ts:318
Dispatches anydrop:<event> on the element too (detail: { args }).
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents |
Parameters
| Parameter | Type |
|---|---|
event | K |
...args | AnyDropEvents[K] |
Returns
this
Overrides
enable()
enable(): void;Defined in: ui/src/AnyDrop.ts:388
Clears disabled.
Returns
void
Overrides
enqueueFile()
enqueueFile(file): void;Defined in: core/src/AnyDropCore.ts:941
Queues an added, accepted file.
Parameters
| Parameter | Type |
|---|---|
file | AnyDropFile |
Returns
void
Inherited from
enqueueFiles()
enqueueFiles(files): void;Defined in: core/src/AnyDropCore.ts:957
Queues several added, accepted files (with autoQueue: false).
Parameters
| Parameter | Type |
|---|---|
files | AnyDropFile[] |
Returns
void
Inherited from
exportErrors()
exportErrors(format?): string;Defined in: core/src/AnyDropCore.ts:522
The error list as JSON or CSV (RFC 4180).
Parameters
| Parameter | Type | Default value |
|---|---|---|
format? | "json" | "csv" | 'json' |
Returns
string
Inherited from
filesize()
filesize(size): string;Defined in: core/src/AnyDropCore.ts:505
Size text for a byte count: '<strong>1.5</strong> MB'.
Parameters
| Parameter | Type |
|---|---|
size | number |
Returns
string
Inherited from
getAcceptedFiles()
getAcceptedFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:463
Files accepted by validation.
Returns
Inherited from
getActiveFiles()
getActiveFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:498
Files in queued, uploading or paused.
Returns
Inherited from
getAddedFiles()
getAddedFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:478
Files with status added.
Returns
Inherited from
getConnectionState()
getConnectionState(): ConnectionState;Defined in: core/src/AnyDropCore.ts:737
The connection as seen by the lifecycle code: browser offline, no answer from the server, or fine.
Returns
Inherited from
AnyDropCore.getConnectionState
getErrors()
getErrors(): ErrorEntry[];Defined in: core/src/AnyDropCore.ts:512
A copy of the error list: one entry per file currently in error.
Returns
Inherited from
getFile()
getFile(id):
| AnyDropFile
| undefined;Defined in: core/src/AnyDropCore.ts:458
A file by its id.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
| AnyDropFile | undefined
Inherited from
getFilesWithStatus()
getFilesWithStatus(status): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:473
Files with the given status.
Parameters
| Parameter | Type |
|---|---|
status | FileStatus |
Returns
Inherited from
AnyDropCore.getFilesWithStatus
getFolder()
getFolder(path): FolderNode | undefined;Defined in: core/src/AnyDropCore.ts:453
A folder node by path, for example getFolder('Photos/2024').
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
FolderNode | undefined
Inherited from
getOption()
Call Signature
getOption<K>(name): AnyDropOptions[K];Defined in: ui/src/AnyDrop.ts:331
Reads the current value of an option.
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents | keyof AnyDropCoreOptions<AnyDropCore> |
Parameters
| Parameter | Type |
|---|---|
name | K |
Returns
Overrides
Call Signature
getOption<K>(name): AnyDropUIOptions[K];Defined in: ui/src/AnyDrop.ts:332
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropUIOptions |
Parameters
| Parameter | Type |
|---|---|
name | K |
Returns
Overrides
AnyDropCore.getOption
getPausedFiles()
getPausedFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:493
Files with status paused.
Returns
Inherited from
getQueuedFiles()
getQueuedFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:483
Files with status queued.
Returns
Inherited from
getRejectedFiles()
getRejectedFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:468
Files rejected by validation.
Returns
Inherited from
getTree()
getTree(): FolderNode;Defined in: core/src/AnyDropCore.ts:448
The virtual root folder (path: ''): top-level folders and loose files. Live object.
Returns
Inherited from
getUploadingFiles()
getUploadingFiles(): AnyDropFile[];Defined in: core/src/AnyDropCore.ts:488
Files in uploading (paused files are not included).
Returns
Inherited from
hasListeners()
hasListeners<K>(event): boolean;Defined in: core/src/events/emitter.ts:76
Whether anyone listens to event (lets hot paths skip building payloads).
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents |
Parameters
| Parameter | Type |
|---|---|
event | K |
Returns
boolean
Inherited from
off()
off<K>(event?, fn?): this;Defined in: core/src/events/emitter.ts:42
off() removes every listener, off(event) every listener of one event. Also matches once() listeners.
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents |
Parameters
| Parameter | Type |
|---|---|
event? | K |
fn? | Listener<AnyDropEvents[K]> |
Returns
this
Inherited from
on()
on<K>(event, fn): Unsubscribe<AnyDrop>;Defined in: core/src/AnyDropCore.ts:310
Adds a listener; returns a function that removes it (chainable: .on(), .once()). No-op after destroy().
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents |
Parameters
| Parameter | Type |
|---|---|
event | K |
fn | Listener<AnyDropEvents[K]> |
Returns
Unsubscribe<AnyDrop>
Inherited from
once()
once<K>(event, fn): Unsubscribe<AnyDrop>;Defined in: core/src/AnyDropCore.ts:317
Adds a listener that runs once. Returns a function that removes it.
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents |
Parameters
| Parameter | Type |
|---|---|
event | K |
fn | Listener<AnyDropEvents[K]> |
Returns
Unsubscribe<AnyDrop>
Inherited from
onListenerError()
protected onListenerError(error): void;Defined in: core/src/events/emitter.ts:82
Called when a listener throws. Overridable (tests).
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
void
Inherited from
paste()
paste(event): Promise<AnyDropFile[]>;Defined in: core/src/AnyDropCore.ts:393
Handles a paste event. Text-only pastes add nothing.
Parameters
| Parameter | Type |
|---|---|
event | { clipboardData?: | DataTransferLike | null; } |
event.clipboardData? | | DataTransferLike | null |
Returns
Promise<AnyDropFile[]>
Inherited from
pause()
pause(): void;Defined in: core/src/AnyDropCore.ts:580
Pauses every file (paused({ scope: 'all', reason: 'user' })).
Returns
void
Inherited from
pauseFile()
pauseFile(file): void;Defined in: core/src/AnyDropCore.ts:612
Pauses one file (the file or its id).
Parameters
| Parameter | Type |
|---|---|
file | string | AnyDropFile |
Returns
void
Inherited from
pauseFolder()
pauseFolder(path): void;Defined in: core/src/AnyDropCore.ts:594
Pauses every file under a folder, also files added to it later. Unknown paths are ignored.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
void
Inherited from
processFile()
processFile(file): void;Defined in: core/src/AnyDropCore.ts:1005
Starts one queued file now, even beyond parallelUploads.
Parameters
| Parameter | Type |
|---|---|
file | AnyDropFile |
Returns
void
Inherited from
processFiles()
processFiles(files): void;Defined in: core/src/AnyDropCore.ts:983
Starts these queued files now, even beyond parallelUploads. Files of a batch that is still open start when it closes. With uploadMultiple, the files of one batch share one request.
Parameters
| Parameter | Type |
|---|---|
files | AnyDropFile[] |
Returns
void
Inherited from
processQueue()
processQueue(): void;Defined in: core/src/AnyDropCore.ts:967
Starts queued files until parallelUploads files are uploading. Files start in add order; a batch's manifest is sent before its first file. Without a url, nothing starts. Called while a batch is still being read, it also runs when that batch closes, so its files are included.
Returns
void
Inherited from
reconnect()
reconnect(): void;Defined in: core/src/AnyDropCore.ts:750
"Retry now": probes at once while the state is unreachable, and clears an offline pause the browser no longer reports. Does nothing when online. Unlike resume(), user pauses stay.
Returns
void
Inherited from
removeAllFiles()
removeAllFiles(cancelIfNecessary?): void;Defined in: core/src/AnyDropCore.ts:1087
Removes every file that is not uploading, or every file when cancelIfNecessary is true. Emits removedfile per file, removedfolder for every folder left without files (also folders dropped empty), then reset.
Parameters
| Parameter | Type | Default value |
|---|---|---|
cancelIfNecessary? | boolean | false |
Returns
void
Inherited from
removeFile()
removeFile(file): void;Defined in: ui/src/AnyDrop.ts:369
Removes a file; cancels it first when it is uploading.
Parameters
| Parameter | Type |
|---|---|
file | AnyDropFile |
Returns
void
Overrides
resolveOption()
resolveOption<T>(option, ...args): T;Defined in: core/src/AnyDropCore.ts:325
Calls a function option with this = the instance, else returns it.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
option | T | ((...args) => T) |
...args | unknown[] |
Returns
T
Inherited from
resume()
resume(): void;Defined in: core/src/AnyDropCore.ts:586
Clears the instance pause and every system reason (offline, hidden). Folder and file pauses stay.
Returns
void
Inherited from
resumeFile()
resumeFile(file): void;Defined in: core/src/AnyDropCore.ts:621
Clears a file's own pause (a paused folder or instance still holds it).
Parameters
| Parameter | Type |
|---|---|
file | string | AnyDropFile |
Returns
void
Inherited from
resumeFolder()
resumeFolder(path): void;Defined in: core/src/AnyDropCore.ts:603
Clears a folder's own pause. Files stay paused while an ancestor, the instance or the file itself is paused.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
void
Inherited from
retryFailedOnly()
retryFailedOnly(folderPath?): number;Defined in: core/src/AnyDropCore.ts:531
Re-queues the files in error (under folderPath, or all) that can be retried: everything but validation rejections. Done chunks are kept; chunkStatusUrl is asked first when set; a failed batch manifest is sent again (same sessionId). Returns the number of files re-queued.
Parameters
| Parameter | Type |
|---|---|
folderPath? | string |
Returns
number
Inherited from
retryFile()
retryFile(file): boolean;Defined in: core/src/AnyDropCore.ts:559
Re-queues one failed file (the file or its id) like retryFailedOnly. Returns whether it was re-queued.
Parameters
| Parameter | Type |
|---|---|
file | string | AnyDropFile |
Returns
boolean
Inherited from
setOption()
Call Signature
setOption<K>(name, value): void;Defined in: ui/src/AnyDrop.ts:337
Changes an option (or an event handler given as an option) at runtime.
Type Parameters
| Type Parameter |
|---|
K extends | keyof AnyDropEvents | keyof AnyDropCoreOptions<AnyDropCore> | "_uuid" | "_random" |
Parameters
| Parameter | Type |
|---|---|
name | K |
value | AnyDropCoreConfig[K] |
Returns
void
Overrides
Call Signature
setOption<K>(name, value): void;Defined in: ui/src/AnyDrop.ts:338
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropUIOptions |
Parameters
| Parameter | Type |
|---|---|
name | K |
value | AnyDropUIOptions[K] |
Returns
void
Overrides
AnyDropCore.setOption
unsubscribe()
protected unsubscribe<K>(event, fn): Unsubscribe<AnyDrop>;Defined in: core/src/events/emitter.ts:87
Builds the function returned by on()/once(). Protected for subclasses; do not shadow it.
Type Parameters
| Type Parameter |
|---|
K extends keyof AnyDropEvents |
Parameters
| Parameter | Type |
|---|---|
event | K |
fn | Listener<AnyDropEvents[K]> |
Returns
Unsubscribe<AnyDrop>
Inherited from
uploadFile()
uploadFile(file): void;Defined in: core/src/AnyDropCore.ts:1010
Alias of processFile. Overriding it changes nothing: use transport instead.
Parameters
| Parameter | Type |
|---|---|
file | AnyDropFile |
Returns
void
Inherited from
uploadFiles()
uploadFiles(files): void;Defined in: core/src/AnyDropCore.ts:1015
Alias of processFiles.
Parameters
| Parameter | Type |
|---|---|
files | AnyDropFile[] |
Returns
void
Inherited from
confirm()
static confirm(
question,
accepted,
rejected?
): void;Defined in: ui/src/AnyDrop.ts:167
Asks a question: window.confirm, overridable (for example with a dialog).
Parameters
| Parameter | Type |
|---|---|
question | string |
accepted | () => void |
rejected? | () => void |
Returns
void
discover()
static discover(root?): AnyDrop[];Defined in: ui/src/AnyDrop.ts:157
Attaches an instance to every .anydrop element that has none and whose AnyDrop.options[id] is not false. Returns the new instances. It only runs when called; the npm builds never call it by themselves.
Parameters
| Parameter | Type | Default value |
|---|---|---|
root? | ParentNode | document |
Returns
AnyDrop[]
forElement()
static forElement(element): AnyDrop;Defined in: ui/src/AnyDrop.ts:173
The instance attached to an element.
Parameters
| Parameter | Type |
|---|---|
element | string | HTMLElement |
Returns
AnyDrop
isBrowserSupported()
static isBrowserSupported(): boolean;Defined in: ui/src/AnyDrop.ts:180
Whether the APIs the UI needs exist.
Returns
boolean
supportsFolderPicker()
static supportsFolderPicker(): boolean;Defined in: ui/src/AnyDrop.ts:195
Feature detection for the folder picker (no user-agent sniffing).
Returns
boolean