Skip to main content

Files

AdamRMS uses S3-compatible for file storage, using the s3files table in the database to keep track of them. Most of the columns are fields related to the S3 specification for retrieving files, but some are added to make it easier to find files across the application.

Column NamePurpose
s3files_idAdamRMS id for the file
instances_idAssociated instance for the file - all files must belong to exactly one instance
s3files_pathThe path to the file in the S3-compatible storage, set by file handlers in bCMS. Should not inlcude a leading /
s3files_nameThe user-facing name for the file
s3files_filenameThe name of the file as it is stored in the S3-compatible storage (not including the path and extension)
s3files_extensionThe file extension (no .)
s3files_original_nameThe filename when originally uploaded, should be immutable (includes extension)
s3files_meta_sizeSize of the file in bytes
s3files_meta_publicWhether the file is publically accessible or only available to those in the associated instances_id - not actually used anywhere
s3files_shareKeyKey used for sharing the file with public, for "anyone with the link" style sharing
s3files_meta_typeThe type of the file - see below
s3files_meta_subTypeDepends what it is - each module that uses the file handler will be setting this for themselves. Usually it's the primary key of the row to which that file relates (like the asset type id of an asset type thumbnail)
s3files_meta_uploadedDate of when file was uploaded - set by the database
users_useridWho uploaded the file
s3files_meta_deleteOnMarker to delete this file on this set date, used to soft-delete files for 30 days before deletion
s3files_meta_physicallyStoredIf we have the file it's 1 - if we deleted it it's 0 but the "deleteOn" is set. If we lost it, it's 0 with a null "delete on"

File Types

Each file has an associated file type, which is used to filter files and decide various properties:

  • ignore instance - File is visible to all authenticated users
  • public - File is visible to un-authenticated users

Files default to private and instance aware, and only specific types vary.

IDFile TypeRestrictions
0Unknown
1unusedn/a
2Asset type thumbnailignore instance, public
3Asset type file attachment
4Asset file attachment
5Instance thumbnailignore instance, public
6unusedn/a
7Project file
8Maintenance job file
9User thumbnailignore instance
10Instance email header imageignore instance, public
11Location file attachment
12Training Module thumbnail
13Training Module image upload for an individual step of a module
14Project payment file attachment
15Public site file attachementignore instance, public
16Public site homepage content imageignore instance, public
17Public site homepage header imageignore instance, public
18Project vacant role - application attachment
19CMS page image upload
20Project Invoice
21Project Quote
22Project Delivery Note