Difference between revisions of "Image field"

From EPrints Documentation
Jump to: navigation, search
(Added Image as metadata field type)
 
m (Additional Properties)
Line 18: Line 18:
 
| name || default || description  
 
| name || default || description  
 
|-
 
|-
| '''maxwidth''' || 640 || ''''Can be overridden in the field definition.'''
+
| '''maxwidth''' || 640 || '''Can be overridden in the field definition.'''
 
|-
 
|-
 
| '''maxheight''' || 480 || '''Can be overridden in the field definition.'''
 
| '''maxheight''' || 480 || '''Can be overridden in the field definition.'''

Revision as of 22:08, 10 April 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


Description

This field store images encoded as base64 data. This may be useful for logos, icons, avatars, etc.

Inheritance

Additional Properties

As for Base64 fields except for:

name default description
maxwidth 640 Can be overridden in the field definition.
maxheight 480 Can be overridden in the field definition.

Required Phrases

No additional phrases beyond those required for Base64 fields.

Database

Image fields are stored in the database as

 fieldname LONGTEXT

API

See API page.

Examples

Most basic example.

{
   name => 'picture',
   type => 'image',
}

Sets bespoke maximum width and height.

{
   name => 'icon',
   type => 'image',
   maxwidth => '64',
   maxheight => '64',
}