Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    12.0p: Downloading binary data via RESTHandler

    Hi Isomorphic,

    it seems that it is not possible to download a file added via the GUI and FileItem/UploadItem via RESTHandler in current 12.0p.

    I tried this:
    Code:
    <request>
        <dataSource>T_ATTACHMENT</dataSource>
        <operationType>downloadFile</operationType>
    </request>
    which results in a normal FETCH and this logged line:
    Code:
    java.lang.Exception: Operation type downloadFile not supported by generateSQLStatement
    I had a look at clientside RestDataSource docs, which only speak about Browser downloads in REST environments as well as the serverside RESTHandler docs which don't seem to handle that topic at all. How do I best do this, download user-uploaded files via RESTHandler?
    If this is not built in yet (?), also a DMI solution with manual fetch and setData() call would be OK.

    Thank you & Best regards
    Blama

    #2
    This one regarding binary uploads via RESTHandler might be related.

    Comment


      #3
      That's correct, there's no support for download from the RESTHandler. From a SmartClient UI, you can just do it via calling IDACall as normal. If you wanted a third party to be able to do the download, you could add a DMI that calls RPCManager.doCustomResponse(), the stream the file yourself.

      Comment

      Working...
      X