# Multipart media

**URL:** <https://gramps.discourse.group/t/multipart-media/5836>\
**Category:** Ideas\
**Tags:** media-download, gedcom7\
**Created:** [August 4, 2024, 9:29pm UTC](https://gramps.discourse.group/t/multipart-media/5836 "2024-08-04T21:29:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [August 4, 2024, 9:29pm UTC](https://gramps.discourse.group/t/multipart-media/5836/1 "2024-08-04T21:29:16Z")

</div>

The gedcom standard (v5 and v7) provides that multiple files can be associated with a media. Clearly, this is not the case for media in Gramps.

Is this a feature that is planned?

This could be useful in many cases. Three come to mind to illustrate my question but for sure there are many others:

- a double-sided document, such as a postcard or a letter,
- the multiple pages of a newspaper,
- the contents of a file, such as a military file.

So we could use a PDF or TIFF format that accepts multipart. But the gedcom standard goes further where a media can include two (and more) files, one of each of these two types for example.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [August 4, 2024, 10:12pm UTC](https://gramps.discourse.group/t/multipart-media/5836/2 "2024-08-04T22:12:15Z")

</div>

Features for restoring the Tree and Media Objects separately would also be useful. (And doing the same with GEDCOM7’s GedZips.) There are oddities with OS cross-compatibilities and managing (or flattening) paths that might evolve more effectively if the functionalities were segregated.

That includes features re-linking paths to objects and managing filenames.

GrampsWeb and Narrated Web Site reorganize media to suit their own intelligent file management concepts.

Some aspects of multiple object Media records are touched upon in the following recent thread:

> [@Allow URL in media object](https://gramps.discourse.group/t/allow-url-in-media-object/5816):
>
> When importing a GEDCOM file I noticed that Gramps does not support a URL as a file reference. GEDCOM 5.5.1 says: MULTIMEDIA\_FILE\_REFERENCE:= A complete local or remote file reference to the auxiliary data to be linked to the GEDCOM context. Remote reference would include a network address where the multimedia data may be obtained. It would be nice if Gramps would allow URLs and not only local file names. btw: it would be nice if Gramps could support more than one file reference per media…

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [August 5, 2024, 3:24pm UTC](https://gramps.discourse.group/t/multipart-media/5836/3 "2024-08-05T15:24:22Z")

</div>

Maybe all file paths should be stored in JSON objects?

e.g

> {  
> “D”: {  
> “sources”: {  
> “subfolder 1”: {  
> “subfolder 2”: {  
> “subfolder 3”: {  
> “subfolder 4”: {  
> “filename.pdf”: {  
> “protocol”: “file”,  
> “system”: “Windows”  
> }  
> }  
> }  
> }  
> }  
> }  
> },  
> “UNC”: {  
> “sources”: {  
> “subfolder 1”: {  
> “subfolder 2”: {  
> “subfolder 3”: {  
> “subfolder 4”: {  
> “filename.pdf”: {  
> “protocol”: “UNC”,  
> “system”: “Windows”  
> }  
> }  
> }  
> }  
> }  
> }  
> },  
> “HTTP”: {  
> “sources”: {  
> “subfolder 1”: {  
> “subfolder 2”: {  
> “subfolder 3”: {  
> “subfolder 4”: {  
> “filename.pdf”: {  
> “protocol”: “HTTP”,  
> “system”: “Web”  
> }  
> }  
> }  
> }  
> }  
> }  
> },  
> “Linux/Unix”: {  
> “sources”: {  
> “subfolder 1”: {  
> “subfolder 2”: {  
> “subfolder 3”: {  
> “subfolder 4”: {  
> “filename.pdf”: {  
> “protocol”: “file”,  
> “system”: “Linux/Unix”  
> }  
> }  
> }  
> }  
> }  
> }  
> }  
> }

In addition, the full original string could be a part of that object, that way it would never be any problems with OS cross-compatibilities or URL’s.  
The file path is then generated for the GUI and is of course clickable…

IT could as well be an XML objects, this was just a quick example to maybe be able to get around some problems that can occur.

These objects can also easily be read and write out to a Gedcom file in whatever format it demands, or other formats as needed.

It would also be easy to store multiple file paths for multiple objects in this format AND it will be human readable.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [August 5, 2024, 7:42pm UTC](https://gramps.discourse.group/t/multipart-media/5836/4 "2024-08-05T19:42:35Z")

</div>

> [@PLegoux](#):
>
> Is this a feature that is planned?

It’s not really planned, but it seems like a good idea. I have no objection to this functionality being added.

The Gedcom standard would provide us with a specification. The only things that I don’t understand is why the `MULTIMEDIA_LINK` lacks a reference to the file for the cropped area. Does it assume the first file?

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [August 5, 2024, 7:44pm UTC](https://gramps.discourse.group/t/multipart-media/5836/5 "2024-08-05T19:44:47Z")

</div>

> [@StoltHD](#):
>
> Maybe all file paths should be stored in JSON objects?

We should probably use the python `Path` object for paths. These could be serialised in a Posix format for readability.

Urls can simply be strings.

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [August 7, 2024, 8:11am UTC](https://gramps.discourse.group/t/multipart-media/5836/6 "2024-08-07T08:11:56Z")

</div>

> [@Nick-Hall](#):
>
> I have no objection to this functionality being added.

Do you want I add a request in Mantis?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [September 6, 2024, 8:12am UTC](https://gramps.discourse.group/t/multipart-media/5836/7 "2024-09-06T08:12:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
