Saltcorn 0.8.0 - Files

By Tom Nielsen
Published on 

Saltcorn 0.8.0 was released last week with the following improvements:

File folders: the way we store files in Saltcorn was completely changed. Previously files had a row in a database table of files and were stored under a machine generated name in a single folder. References to files were references to the database row. Now, files are stored under their own names and can be in folders; references to files are now strings with the relative file path. When creating a form with a file upload, you can now choose which folder the uploaded files should go in, as well as put restrictions on the accepted file types (thank you to Aleksandr Sokolov for implementing this restriction). File permission and ownership are set with extended attributes. Note that file delivery currently only checks the permissions on the file requested, not all the transitive permissions on the folder in the file’s path. This additional check will be implemented in a future version.

This change opens several operational possibilities. You could for instance ask Saltcorn to use a network drive as its file storage directory. That way you can both open files in Saltcorn and through your mounted drive.  You could have the network drive be a sub folder inside the Saltcorn file storage; or the Saltcorn files could be a subfolder in a larger shared drive.

To help manage files in folders, Saltcorn 0.8.0 has an improved file manager that helps you navigate folders, preview images, and move files between folders. The new file manager is written in Svelte – I very impressed by how easy it was to write standalone components in this framework.

There is however a lot of scope for improving the file manager which will hopefully happen over the next releases. Some of the things I would like to build are search for file by name or contents, move files by drag and drop (including from the desktop), and more operations on files (e.g. zip/unzip). In addition, I would like to create a view pattern version of the file manager so users can browser files in a selected folder, subject to their permissions.

User groups – we are currently tightening up the permission system over several releases. In this release, you now have the ability in table ownership formula to use aggregations so you can declare many to many relationships as user groups.

Email improvements – email formatting is vastly improved by Christian Hugo.

Reorganise admin forms – we are reorganising the administrators forms to make things more logical. Aleksandr Sokolov created new pages and improved the overall organisation. Some pages are also now using accordions, tabs and section headers to organise the admin and configuration fields.

Sync external tables – a new action allows you to synchronise external and internal tables. This is useful because external tables are often used as interfaces to remote APIs and other external resources. Synchronising to an internal table adds persistence.


Recent posts