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

REST API, DSpace6.0 update bitstream data returns http 500

    XMLWordPrintable

    Details

    • Attachments:
      1
    • Comments:
      5
    • Documentation Status:
      Not Required

      Description

      As described by Sebastijan Elbl,

      I'm trying to update the content of bitstream via REST API but I get : HTTP 500 - Internal Server Error

      CURL:
      post new BITSTREAM:.
      curl --cookie "JSESSIONID=EDEC553C67C1AD18BDF4AC4A45EE6D0F" -H "accept:application/json" -H "Content-Type: application/json" -X POST
      "localhost:8080/rest/items/d83bdd1c-553d-4529-9bcf-a783637befc9/bitstreams?name=test&description=testing" -T "test.txt"
      result: http 200

      trying update previus BITSTREAM:

      curl --cookie "JSESSIONID=EDEC553C67C1AD18BDF4AC4A45EE6D0F" -H "accept:application/json" -H "Content-Type: application/json" -X PUT
      "localhost:8080/rest/bitstreams/a8fbf6d5-9984-4b0d-8f76-cfa339e46f8d/data"-T "test2.txt

      result: http 500

      From dspace log:
      INFO org.dspace.content.BitstreamServiceImpl @ user1@example.com::update_bitstream:bitstream_id=a8fbf6d5-9984-4b0d-8f76-cfa339e46f8d
      ERROR org.dspace.rest.Resource @ Something get wrong. Aborting context in finally statement.

      From REST API documentation:
      PUT /bitstreams/

      {bitstream id}

      /data - Update the contents of the specified bitstream.

      REST API is working otherwise, in DSpace 5.x there was no problem with updating bitstream contents.

        Attachments

          Activity

            People

            Assignee:
            kshepherd Kim Shepherd
            Reporter:
            elieabuhaydar Elie Abu Haydar
            Reviewer:
            Terrence W Brady
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: