ubbase64 – store and retrieve a blob in a table using base64 encoding


ubbase64 –function get|put –attribute <attribute> –key <key> –match <match> {–format html|textarea} <table>


ubbase64 is used to store and retrieve BLOBs (binary large objects) in a Unibase table.

Typically this is used to store random text and images, but can be used for anything.

The table to be used for storage needs to have a specific format. Two attributes, the first being the index attribute and the second an attribute of 60 characters that is used to store the base64 encoded BLOB.


: note
noteNumber, 6
note, 60

A separate table is normally used to hold meta information about the note.

Unibase guarantees the order of data stored so there is no need to be more specific about the indexes.

To store a BLOB you must specify the function as put and the attribute to store the BLOB in, the key in the table, the match value, and the table name.

When storing data ubbase64 reads stdin for data.

To retrieve a blob use the function get along with the other attributes.

The retrieved BLOB is output on stdout.

ubbase64 can also format a text BLOB so that it is suitable for display in html (–format html) or for use in a textarea input (–format textarea).

–format raw will return the raw base64 text.


–attribute attribute used to save BLOB
–function  get (retrieve) or put (save)
–format  html or textarea or raw
–key  name of key to match
–match  value to match