xrsh-buildroot/buildroot-v86/board/v86/rootfs_overlay/root/bin/upload

14 lines
489 B
JavaScript
Executable File

#!/bin/js
// this allows opening a file upload popup, to upload to the clipboard.
// because not all input devices (handcontrols) present copy/paste contextmenus
// or file drag/drop functionality
//
const isoterminal = document.querySelector('[isoterminal]').components.isoterminal
const upload = isoterminal.vt100.upload
const scene = document.querySelector('a-scene')
// trigger file input
scene.exitVR()
upload.click()
return "[i] files are uploaded in /mnt/clipboard\n"