⧼vector-jumptocontent⧽

Base64 field: Difference between revisions

From EPrints Documentation
m Spacing after ToC
Moved description to top. Added link to API page.
Line 1: Line 1:
{{fieldtypes}}
{{fieldtypes}}


== Description ==
Base64 encoded data.


== Inheritance ==
== Inheritance ==
* [[:Category:EPrints_Metadata_Fields|Metadata field]]
* [[:Category:EPrints_Metadata_Fields|Metadata field]]
** [[Text field]]
** [[Text field]]
*** [[Longtext field]]
*** [[Longtext field]]
**** [[Base64 field]]
**** [[Base64 field]]
== Description ==
Base64 encoded data.


== Properties ==
== Properties ==
As for [[text field]]s with the following differences...
As for [[text field]]s with the following differences...


Line 32: Line 30:


== API ==
== API ==
''To be added''
See [[API:EPrints/MetaField/Base64|API page]].


== Examples ==
== Examples ==

Revision as of 08:14, 21 March 2023


Description

Base64 encoded data.

Inheritance

Properties

As for text fields with the following differences...

name default description
input_rows n/a This property is taken from the repository configuration.
maxlength 65535 Can be overridden in the field definition.

Required Phrases

No additional phrases.

Database

Base64 fields are stored in the database as

 fieldname LONGTEXT

API

See API page.

Examples

A 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',
}