Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Issue 640 (#19)
Browse files Browse the repository at this point in the history
* Adding mimetype to images with file fields.  Exporting mimetype as ebucore:hasMimeType

* Merging from upstream

* Found a lingering reference to image_obj
  • Loading branch information
dannylamb authored and whikloj committed Nov 22, 2017
1 parent 2e0afbe commit 63e7217
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ content:
region: content
hidden:
created: true
field_mimetype: true
uid: true
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ content:
region: content
hidden:
created: true
field_mimetype: true
name: true
uid: true
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ content:
region: content
hidden:
created: true
field_mimetype: true
uid: true
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ content:
region: content
hidden:
created: true
field_mimetype: true
name: true
uid: true
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ content:
settings: { }
third_party_settings: { }
type: file_default
field_mimetype:
type: string
weight: 4
region: content
label: above
settings:
link_to_entity: false
third_party_settings: { }
name:
label: hidden
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ hidden:
name: true
thumbnail: true
uid: true
field_mimetype: true
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ hidden:
name: true
thumbnail: true
uid: true
field_mimetype: true
8 changes: 8 additions & 0 deletions config/install/core.entity_view_display.media.jp2.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,13 @@ content:
weight: 1
settings: { }
third_party_settings: { }
field_mimetype:
type: string
weight: 4
region: content
label: above
settings:
link_to_entity: false
third_party_settings: { }
hidden:
thumbnail: true
24 changes: 24 additions & 0 deletions config/install/field.field.media.image_tiff.field_mimetype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: be83e502-ccde-4ea8-b316-7a5f4a2fa8be
langcode: en
status: true
dependencies:
enforced:
module:
- islandora_image
config:
- field.storage.media.field_mimetype
- media_entity.bundle.image_tiff
id: media.image_tiff.field_mimetype
field_name: field_mimetype
entity_type: media
bundle: image_tiff
label: Mimetype
description: ''
required: false
translatable: true
default_value:
-
value: image/tiff
default_value_callback: ''
settings: { }
field_type: string
24 changes: 24 additions & 0 deletions config/install/field.field.media.jp2.field_mimetype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: 1f57ede0-8919-4d9e-b689-e0a0d9748e85
langcode: en
status: true
dependencies:
enforced:
module:
- islandora_image
config:
- field.storage.media.field_mimetype
- media_entity.bundle.jp2
id: media.jp2.field_mimetype
field_name: field_mimetype
entity_type: media
bundle: jp2
label: Mimetype
description: ''
required: false
translatable: true
default_value:
-
value: image/jp2
default_value_callback: ''
settings: { }
field_type: string
7 changes: 3 additions & 4 deletions config/install/rdf.mapping.media.image_tiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ fieldMappings:
properties:
- 'dc:title'
- 'rdf:label'
field_file:
properties:
- 'iana:describes'
mapping_type: rel
created:
properties:
- 'schema:dateCreated'
Expand All @@ -36,3 +32,6 @@ fieldMappings:
properties:
- 'schema:author'
mapping_type: rel
field_mimetype:
properties:
- 'ebucore:hasMimeType'
7 changes: 3 additions & 4 deletions config/install/rdf.mapping.media.jp2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ fieldMappings:
properties:
- 'dc:title'
- 'rdf:label'
field_file:
properties:
- 'iana:describes'
mapping_type: rel
created:
properties:
- 'schema:dateCreated'
Expand All @@ -36,3 +32,6 @@ fieldMappings:
properties:
- 'schema:author'
mapping_type: rel
field_mimetype:
properties:
- 'ebucore:hasMimeType'
7 changes: 3 additions & 4 deletions config/install/rdf.mapping.media.web_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ fieldMappings:
properties:
- 'dc:title'
- 'rdf:label'
field_image:
properties:
- 'iana:describes'
mapping_type: rel
created:
properties:
- 'schema:dateCreated'
Expand All @@ -36,3 +32,6 @@ fieldMappings:
properties:
- 'schema:author'
mapping_type: rel
field_mimetype:
properties:
- 'ebucore:hasMimeType'

0 comments on commit 63e7217

Please sign in to comment.