Commit b9390881 authored by Dannon Baker's avatar Dannon Baker
Browse files

Set default display behavior for image datatypes to inline preview

Image datatypes now display inline in dataset previews by default, with
browser-compatible formats like PNG and JPG showing previews instead of
download prompts. Specialized formats like proprietary microscopy and
medical imaging files still trigger downloads as appropriate.
parent aa1cf40e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ class Image(data.Data):
    edam_data = "data_2968"
    edam_format = "format_3547"
    file_ext = ""
    display_behavior = "inline"  # Most image formats can be displayed inline in browsers

    MetadataElement(
        name="axes",
@@ -419,18 +420,22 @@ class OMEZarr(data.ZarrDirectory):

class Hamamatsu(Image):
    file_ext = "vms"
    display_behavior = "download"  # Proprietary microscopy format, not browser-displayable


class Mirax(Image):
    file_ext = "mrxs"
    display_behavior = "download"  # Proprietary microscopy format, not browser-displayable


class Sakura(Image):
    file_ext = "svslide"
    display_behavior = "download"  # Proprietary microscopy format, not browser-displayable


class Nrrd(Image):
    file_ext = "nrrd"
    display_behavior = "download"  # Medical imaging format, not browser-displayable


class Bmp(Image):