Preview of photos directly from Disk using File System Report?


I am using sequential workflow to upload all jpg files from one folder. I would like to have also preview of the picture on the screen.

Current implementation


  1. I have a workflow where in the first step I load all the files using FileSystemService.GetFileSystemInfo.
  2. I prepare a screen data using xslt transformation to produce what I need including possible URL of the image.
  3. I display data what is going to be loaded.


  1. I have System File Report, currently with full fixed path to existing file.
  2. I have API for a REPORT Page api/public/photouploadpreview which should load the above report


API Problem

  1. I access the URL http://localhost:8080/api/public/photouploadpreview
  2. I receive (In Mozilla Firefox)

Troubleshooting notes

  1. I enabled logging
  <logger name="Origam.ServerCommon.Pages.UserApiProcessor" additivity="false">
    <level value="TRACE"/>
    <appender-ref ref="FileAppender"/>
    <appender-ref ref="Console" />
  1. The logging shows only:
2021-11-15 17:23:46,860 [31] DEBUG Origam.ServerCommon.Pages.UserApiProcessor - Resolving page /api/public/photouploadpreview.
  1. I checked the code and I have found that the file is being read as Text. Is it possible that there is incorrect reading into Stream?
class ReportPageRequestHandler

For File System Report it uses File.OpenText method, so it does not read file as binary but as text.

For File System Report:

Reading file from disk with method File.OpenText:


Am I missing something in my configuration or this scenario is not supported yet in this way? Any suggestions?

Can you please link the actual source-code instead of snippets and screenshots? It can be done by clicking on the line number in the code in GitHub and then ... and then selecting Copy Permalink. Then you just paste it here.

1 Like

Fixed. Looks good. Thank you for navigation.