Overview

I investigated an issue where PLY files were not being output as items in IIIF manifests by the Omeka S IIIF Server module, while GLB files were output correctly.

Prerequisites: Omeka S Configuration

By default, PLY files cannot be uploaded to Omeka S. The following configuration is required.

Error When Uploading PLY Files

With default settings, upload errors occur because the PLY file’s media type (application/octet-stream) and extension (.ply) are not permitted.

Adding Configuration

In the admin panel under “Settings” > “Security”, add the following:

  • Allowed media types: Add application/octet-stream
  • Allowed file extensions: Add ply

Cause

The module did not have processing code for PLY files.

While there was explicit extension checking and type conversion code for GLB files, no equivalent code existed for PLY files.

Technical Details

GLB File Processing (Existing Before Fix)

TraitMedia.php (format() method)

i}f($$i}mefexdt(ie$raneeTsxtyitupoerennns==i'=om=snotd'r=eat=lpo=/plglo'liwgtcelfarb-t('bip)ioannt{a/hroiycn'tf;eot(-(ssttrreianmg'))${this->resource->source(),PATHINFO_EXTENSION));

IiifTypeOfMedia.php

i}f($$i}mefexdt(ie$raneeTsxtyitupoerennns==i$=om=snetd'r=iat=apo=Iplilo'iiwgfcelTarbyt('pip)eoasnt{[/h$oimcnetfdeoit(a-(Issdtt]rrei=anmg'')M)o$d{meeld'i;a->source(),PATHINFO_EXTENSION));

IIIF Manifest Items Generation Flow

  1. Media type determination (TraitMediaInfo.php)

    • Each media is classified into a IIIF type (Image, Video, Sound, Text, Dataset, Model, other, invalid)
  2. Painting candidate prioritization

    • Priority order: Model > Video > Sound > Image > Text
    • Model type is prioritized for Canvas painting
  3. Canvas placement (Manifest.php)

f}orea$i}cmfhed((i$$amtIehndCifirsoae-Ia>=ntrfee$ostCoh&aui&nrsvc-!ae>es-mm>epamdtneiydda(iI$aanmd(fed)od(ita$aosmIeni$dftmioeea[md)'si;paa)in{ting'])){

Why PLY Was Not Included in Items

  1. When a PLY file is uploaded, the media type is often application/octet-stream
  2. There was no code to check the .ply extension
  3. The IIIF type was not recognized as Model and was classified as other or invalid
  4. The painting key was not set, so no Canvas was generated

Fix

1. src/Iiif/TraitMedia.php

i}f($$i}}mefexedt(lie$rsraneeeeTsxtityitufupoerrennn(ns$==i'e'=omxm=snototded'r=eneat=lslpo=/iplgplo'lnliwgtycelf='arb-=;t('b=ip)ioan'nt{ap/hrloiyycn''tf;)eot({-(ssttrreianmg'))${this->resource->source(),PATHINFO_EXTENSION));

2. src/View/Helper/IiifTypeOfMedia.php

i}f($$i}}mefexedt(lie$rsraneeeeTsxtityitufupoerrennn(ns$==i$e$=omxm=snetetded'r=iniat=asapo=IiIplioilo'iniiwgffcelT=Tarby=yt('p=pip)eeoas'snt{[p[/h$l$oimymcne'etfd)deoiit(a{a-(IIssddtt]]rrei==anmg''')MM)oo$dd{meeelld''i;;a->source(),PATHINFO_EXTENSION));

Behavior After Fix

When a PLY file (.ply extension) is recognized as application/octet-stream:

  • The media type is returned as model/ply
  • The IIIF type is recognized as Model
  • It is output in the IIIF manifest items just like GLB files

Output Example

After the fix, the IIIF manifest for an item containing a PLY file is output as follows:

{}""""}"]@itl,icdyato"pben:ee"]m{}t"lnse":"o"xh:n:tt"e"""""}"]"tM{"c[@itl,i:pa:acdyat:nco"pbe"/i[tn:ee"]m{}h/fut"lnstlese":"o"tos"xh:n:pcttt"e""""]:a""tC{"1[iti/l,:pa:"dyt/h:n"peio"/[:em{}ish/a"sittls":"fto"h:.ipc,t"""""}"ii:atA[itmb,toi/lpndyooa/f/h:n"ptdra/io/:eiy"""gp3ist"v"itfeiitla":a:dyot3fotht"pr"p/.icit"i{:em:rmiiaotAo"aeaoilnpnn":t"sn/fhP:n"h"heia/oa/:t":tnfp3sgttMtteitela"po"pas3/"otp:dm:ttp/i,cia/eo/i"rciaoi/ld/o,eailnnl"elnsnfh"to,lo/ev/o,ic/c3na3snapa/ts/tglllca/3/"hyhotp/i,o"oni1aissto"nitten,nf//x/o/fit3t3ii./a/lijct3efsoi/s/onoa/3ntnno/"e-nr3,xpoi/tatgc.gaiajetnns/iavo4olan"n/s",/5/,44p"91,6"53c63ab23c880e4625fa3b6dae46a817b9b2.ply",

A Canvas is generated within items, with the body type output as Model and format as model/ply.

FileRole
src/Iiif/TraitMedia.phpMedia format (MIME type) determination
src/View/Helper/IiifTypeOfMedia.phpIIIF type (Image, Model, etc.) determination
src/Iiif/TraitMediaInfo.phpMedia information collection and painting candidate selection
src/Iiif/Manifest.phpIIIF manifest items generation

Acknowledgments

The sample PLY file data used in this investigation was downloaded from the following article:

Investigation Date

2026-02-06