Accessing Files on the Omega via a Web Browser
Omega Tip of the Week:
Accessing Files on the Omega Via a Web Browser
This week we’ll show you how to access files and directories on the Omega from your web browser!
This is done via symbolic links, or soft links, which are basically files that point to other files in the system. They’re like Shortcuts in Windows.
Create a soft link to the directory you want to make available and place it in the /www directory like so:
ln -s /path/to/directory /www/pathname
Then the files in /path/to/directory will be available at omega-ABCD.local/pathname, where ABCD is the 4 digits in your Omega’s hostname. The Omega’s server program will automatically serve the files without having to reload or reboot.
By default, omega-ABCD.local will load the Onion Console. Let’s say we have an application that takes timelapse photos and stores them in /root/timelapse. If we symlink the directory using the process above, the photos will be available at omega-ABCD.local/timelapse:
You can then download them from the Omega.
And that’s it!
Let us know what kind of stuff you would like to see featured on 2–Bullet Tuesday! Send a tweet to @OnionIoT with your suggestions!
Thanks for reading! Have a great week!
P.S. — We’ve stocked up the Onion online store, it is now up and running!
P.P.S. — We’re still shipping crowd-funded packages on a daily basis! If you haven’t gotten yours yet, sit tight!