Skip to content

Stored data

Currently in development

This bundle is currently in development, thus not everything may work as explained here.

Tables

Below a table is provided with all the fields that are stored in the SQL table for blob

Field Required (not nullable) Type Description Max. length
identifier Yes string An unique identifier of the resource, implemented using a UUID 128
prefix Yes (at least empty string) string The prefix assigned to the resource 512
file_name Yes (at least empty string) string The original file name given when uploading the file 512
internal_bucket_id Yes string The bucketID of the bucket in which the resource is stored 50
date_created Yes datetime_immutable The date the resource was created in blob stored as a datetime immutable -
date_accessed Yes datetime_immutable The date the resource was last access in blob stored as a datetime immutable -
date_modified Yes datetime_immutable The date the resource was last modified in blob stored as a datetime immutable -
metadata No JSON Metadata the user can provide. This needs to be a valid json. This metadata can get checked against a json schema, if a type is specified. - (1 GB)
type No text (Document / File) Type the user can provide - (65535 bytes)
mime_type Yes (at least empty string) string The mime type of the provided file 255
delete_at No datetime_immutable The date the resource will expire and be deleted from blob as a datetime immutable. NULL means there is no expiration date. Expired items will never be returned, even if they still are visible in the database. -
file_size Yes integer The size of the file in byte -
notify_email Yes (at least empty string) string The email of someone who should get notified before the resource is deleted 255
file_hash No string SHA2 hash of the uploaded file. Used for file integrity checks.
metadata_hash No string SHA2 hash of the uploaded metadata. Used for metadata integrity checks.

Indexes

For efficiency's sake, there are many indexes automatically created. Indexes on the columns identifier, internal_bucket_id, prefix, date_created and delete_at are automatically created. The efficiency was tested on tables with up to ~22Mio different entries.

Metadata and Type

Metadata is stored as a json, and is linked to the type. Given metadata needs to be a valid json, otherwise an error is returned. If a type is given, metadata which matches the json schema of the given type needs to be provided. The json schema of the type is stored in the blob config in additional_types defined on a bucket level.