@singularsystems/neo-core 0.10.59 → 0.10.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -103,7 +103,7 @@ var FileManagerBase = /** @class */ (function () {
|
|
|
103
103
|
}
|
|
104
104
|
if (this.validateFiles(files)) {
|
|
105
105
|
if (this.options.onFilesSelected) {
|
|
106
|
-
this.options.onFilesSelected(files, this);
|
|
106
|
+
return [2 /*return*/, Promise.resolve(this.options.onFilesSelected(files, this))];
|
|
107
107
|
}
|
|
108
108
|
else if (this.uploadEndpoint) {
|
|
109
109
|
if (!options.additionalData && this.options.additionalData) {
|
|
@@ -15,7 +15,7 @@ export interface IBaseFileManagerOptions {
|
|
|
15
15
|
* Callback to run when files are selected. If this callback is provided, you must manually
|
|
16
16
|
* call FileManager.uploadFiles, passing in the file list.
|
|
17
17
|
*/
|
|
18
|
-
onFilesSelected?: (files: FileList | File[], manager: IFileManager) => void
|
|
18
|
+
onFilesSelected?: (files: FileList | File[], manager: IFileManager) => void | Promise<void>;
|
|
19
19
|
/** Additional dictionary data to send to server. Only called if onFilesSelected is not provided. */
|
|
20
20
|
additionalData?: SimpleDictionary | (() => SimpleDictionary);
|
|
21
21
|
/** Callback to run after the upload has completed. The axios response data property is passed to the callback. */
|