Difference between revisions of "Base64 field"

From EPrints Documentation
Jump to: navigation, search
m (Description)
(Added standard sections some with content)
Line 24: Line 24:
  
 
== Required Phrases ==
 
== Required Phrases ==
 +
No additional phrases.
 +
 +
== Database ==
 +
Base64 fields are stored in the database as
 +
  fieldname LONGTEXT
 +
 +
== API ==
 +
''To be added''
 +
 +
== 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 <tt><textarea></tt> should have a height of five rows for entering this metadata.
 +
{
 +
    name => 'code',
 +
    type => 'base64',
 +
    input_rows=> '5',
 +
}

Revision as of 08:21, 20 March 2023

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid

Inheritance

Description

Base64 encoded data.

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

To be added

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