summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts/select-file.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2022-05-28 01:31:23 +0900
committertamaina <tamaina@hotmail.co.jp>2022-05-28 01:31:23 +0900
commitfa99d9c6fee3a7d6f72e254e0aa55972cd6538fb (patch)
tree43d941bbacc9cfaa911fc785fce0b34af4ef6fcc /packages/client/src/scripts/select-file.ts
parentMerge branch 'develop' into pizzax-indexeddb (diff)
parentfix(docs): correct information for drive upload (#8736) (diff)
downloadsharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.tar.gz
sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.tar.bz2
sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.zip
Merge branch 'develop' into pizzax-indexeddb
Diffstat (limited to 'packages/client/src/scripts/select-file.ts')
-rw-r--r--packages/client/src/scripts/select-file.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/client/src/scripts/select-file.ts b/packages/client/src/scripts/select-file.ts
index 49a46f0bb2..461d613b42 100644
--- a/packages/client/src/scripts/select-file.ts
+++ b/packages/client/src/scripts/select-file.ts
@@ -19,10 +19,10 @@ function select(src: any, label: string | null, multiple: boolean): Promise<Driv
Promise.all(promises).then(driveFiles => {
res(multiple ? driveFiles : driveFiles[0]);
- }).catch(e => {
+ }).catch(err => {
os.alert({
type: 'error',
- text: e
+ text: err
});
});
@@ -54,9 +54,9 @@ function select(src: any, label: string | null, multiple: boolean): Promise<Driv
const marker = Math.random().toString(); // TODO: UUIDとか使う
const connection = stream.useChannel('main');
- connection.on('urlUploadFinished', data => {
- if (data.marker === marker) {
- res(multiple ? [data.file] : data.file);
+ connection.on('urlUploadFinished', urlResponse => {
+ if (urlResponse.marker === marker) {
+ res(multiple ? [urlResponse.file] : urlResponse.file);
connection.dispose();
}
});