Article Preview
Buy Now
COLUMN
Checking Out XFS
Open Source code for Xojo
Issue: 15.2 (March/April 2017)
Author: Scott Boss
Author Bio: Scott Boss is the founder of Nocturnal Coding Monkeys, Llc, who specialize in writing custom software. Scott has been a developer, system administrator, storage engineer, consultant, and architect to businesses from startup to global 100.
Article Description: No description available.
Article Length (in bytes): 5,813
Starting Page Number: 81
Article Number: 15210
Related Web Link(s):
http://vxug.org
http://campsoftware.com/products/xanadu-for-xojo.php
http://campsoftware.com/products/xfs-for-xojo.php
Excerpt of article text...
The inspiration for today's topic actually came from me attending the first "Virtual Xojo Users Group" meeting (
http://vxug.org
). During the VXUG meeting, Hal Gumbert demoed a product he is working on called Xanadu (http://campsoftware.com/products/xanadu-for-xojo.php
). During Hal's demo, he used XFS (http://campsoftware.com/products/xfs-for-xojo.php
) for the images.Now, as a storage expert, that really peaked my interest. I see how you could do a centralized storage of files in a similar way as Amazon S3, Dropbox, and Amazon Drive. Perhaps you are asking yourself, "Why should I care about XFS?"
If you are doing websites and web applications, having a centralized location for files like images is awesome. All the applications being able to share the files is a big bonus. XFS lets us Xojo developers totally control how we serve up the files via API calls and where we deploy them.
The code comes with two sample applications. First is
xojo-server.xojo_binary_project
. That is the sample code of a Xojo web application that serves as the XFS server. See Figure 1 as it is the screenshot of the application running. It is not very interesting.The second bit of code is
xojo-uploader.xojo_binary_project
. It is sample code to show how to upload files to XFS via a web application. See Figure 2, which is a screenshot of the uploader running.To show how easy it is to expand the XFS functionality. I added the ability to get the MD5 hash of a file. To do so, you add
/HASH
to the end of the URL of the file. The API strips the/HASH
of the URL and processes the file, returning the hash. This would be a good way to validate that the file on the server is the same as what you have locally. Code Listing 1 is theHashServe
method. Whereas the Code Listing 2 is the modification to theFileServe
method.
...End of Excerpt. Please purchase the magazine to read the full article.