Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  download document from plugin service

    Posted Wed July 29, 2020 05:25 PM

    Hi,

    I created a plugin service which is getting document from the repository. If I set the stream/bytearray into the response, I get error on frontend with the whole document as error text.

    How can I set the stream in response so that the dojo can call the plugin service and can download the response.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: download document from plugin service

    Posted Thu July 30, 2020 02:23 AM

    please try to use response.setContentType("application/octet-stream"); to check if it works



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: download document from plugin service

    Posted Thu July 30, 2020 03:11 PM

    Hi Honglin,

    I tried this but it shows error on front end. I can see the whole content in the response for this plugin service call but the whole content is shown as error text with the main message as

    a connection cannot be established to the webclient by using the following URL. the following error was returned ( and in error the whole content of document is displayed in error pop up).



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: download document from plugin service

    Posted Tue August 04, 2020 02:45 AM

    Hi,

    I think you may need to convert stream/bytearray to Java inputStream first and then add it into response.

    Thanks,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration