2020-01-29 13:37:25 -06:00
|
|
|
import DriveWindow from '../components/drive-window.vue';
|
|
|
|
|
|
|
|
export function selectDriveFile($root: any, multiple) {
|
|
|
|
return new Promise((res, rej) => {
|
|
|
|
const w = $root.new(DriveWindow, {
|
2020-04-21 10:34:56 -05:00
|
|
|
type: 'file',
|
2020-01-29 13:37:25 -06:00
|
|
|
multiple
|
|
|
|
});
|
|
|
|
w.$once('selected', files => {
|
|
|
|
res(multiple ? files : files[0]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|