⧼vector-jumptocontent⧽

Base64 field: Difference between revisions

From EPrints Documentation
m Removed link to API page (just a redirect to this)
Line 21: Line 21:
Base64 fields are stored in the database as
Base64 fields are stored in the database as
   fieldname LONGTEXT
   fieldname LONGTEXT
== API ==
See [[API:EPrints/MetaField/Base64|API page]].


== Examples ==
== Examples ==

Revision as of 09:39, 9 July 2024


Description

This field store Base64 encoded data. This may be useful for storing the binary data of small files (e.g. logos, avatars, etc.).

Inheritance

Additional Properties

As for Longtext fields.

Required Phrases

No additional phrases beyond those required for Longtext fields.

Database

Base64 fields are stored in the database as

 fieldname LONGTEXT

Examples

Most basic example.

{
   name => 'base64_data',
   type => 'base64',
}

Limit the maximum size of file data that can submitted to 2 MiB.

{
   name => 'file_data',
   type => 'base64',
   maxlength => '2097152',
}

Displayed <textarea> should have a height of five rows for entering this metadata.

{
   name => 'code',
   type => 'base64',
   input_rows=> '5',
}