diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-gltf-model b/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-gltf-model new file mode 100755 index 0000000..c4909c0 --- /dev/null +++ b/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-gltf-model @@ -0,0 +1,6 @@ +#!/bin/sh +test -n "$1" || { echo "usage: a-gltf-model "; exit; } + +file="${1#/}" # strip leading slash if present + +echo "" >> /root/index.html diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-text b/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-text new file mode 100755 index 0000000..a4712c4 --- /dev/null +++ b/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-text @@ -0,0 +1,7 @@ +#!/bin/sh +test -n "$1" || { echo "usage: a-text "; exit; } + +str="$1" +test -f "$str" && str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks + +echo "" >> /root/index.html diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/filetype/txt/a-text b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/filetype/txt/a-text new file mode 120000 index 0000000..3de2a3c --- /dev/null +++ b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/filetype/txt/a-text @@ -0,0 +1 @@ +../../../bin/a-text \ No newline at end of file diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/filetype/txt/import-to-aframe b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/filetype/txt/import-to-aframe deleted file mode 100755 index 60cac44..0000000 --- a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/filetype/txt/import-to-aframe +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# usage: import-to-aframe - -str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks - -echo "" >> /root/index.html diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/a-gltf-model b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/a-gltf-model new file mode 120000 index 0000000..68fd8ab --- /dev/null +++ b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/a-gltf-model @@ -0,0 +1 @@ +../../../../bin/a-gltf-model \ No newline at end of file diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/import-to-aframe b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/import-to-aframe deleted file mode 100755 index 60cac44..0000000 --- a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/import-to-aframe +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# usage: import-to-aframe - -str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks - -echo "" >> /root/index.html diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/import-to-scene b/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/import-to-scene deleted file mode 100755 index db72fc1..0000000 --- a/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/mimetype/model/gltf-binary/import-to-scene +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -logger "*TODO*: importing to scene" diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/manual.md b/buildroot-v86/board/v86/rootfs_overlay/root/manual.md index 9602047..05806c9 100644 --- a/buildroot-v86/board/v86/rootfs_overlay/root/manual.md +++ b/buildroot-v86/board/v86/rootfs_overlay/root/manual.md @@ -168,3 +168,16 @@ ctrl a X -> remove active win­dow from split screen ctrl a O -> logout active win­dow (dis­able out­put) ctrl a I -> login active win­dow (enable output) ``` + +## webrequests to the filesystem + +Javascript webrequests can read from the filesystem via the 'file://host/path' protocol: + +``` +fetch("file://xrsh/mnt/profile.browser") +``` + +current [security] limitations: + +* only /mnt directory is exposed +* file needs to be world-readable (`chmod +r /mnt/`)