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

14 lines
485 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]')
const upload = isoterminal.dom.querySelector("#pastedrop")
const scene = document.querySelector('a-scene')
// trigger file input
scene.exitVR()
upload.click()
return "[i] files are uploaded in /mnt/clipboard\n"