I recommend looking at the coverage of the Resource Facade in the Making Apps for Moqui book from moqui.org (chapter 5). Saving to the local file system is just a matter of using a different resource location prefix, i.e. something like file: instead of dbresource: (or even component: if the component is in the filesystem). There is an example of this in the HiveMind wiki where attachments to wiki pages are saved to either the database (DBDEMO wiki space) or the local filesystem (DEMO wiki space).
The main reason to put such things in the database or in a JCR content repository is that it is shared among multiple servers in a pool. Using the local filesystem on an app server, unless it comes from a source repository and is the same on all app servers, is usually a bad idea. For production management it is best to treat app servers as disposable and use the database or a content repository as the persistent store (with replication, backups, etc for reliability).