Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4352

Inconsistent way to guess Mimetype by the REST API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Code Review Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.3, 5.10
    • Fix Version/s: None
    • Component/s: REST API
    • Attachments:
      0
    • Comments:
      3

      Description

      The REST API uses the following method
      https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/BitstreamResource.java#L716

      to guess the mimetype instead than
      dspace 5: org.dspace.content.FormatIdentifier.guessFormat(Context, Bitstream)
      dspace 6 & 7: org.dspace.content.service.BitstreamFormatService.guessFormat(Context, Bitstream)

      far from be perfect but at least we should use a consistent strategy in all the layer.

      In our specific case, this lead to an issue trying to ingest office file via REST as it rely on the JDK URLConnection and also if the doc, docx extension is added to the dspace file format registry it is not found

        Attachments

          Activity

            People

            Assignee:
            l_a_p Luigi Andrea Pascarelli (4Science)
            Reporter:
            bollini Andrea Bollini (4Science)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: