[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: PASOE/REST/DOH - File Download

  • Thread starter Thread starter jts-law
  • Start date Start date
Status
Not open for further replies.
J

jts-law

Guest
Peter, Just wanted to let you know quick that I think I'm close. I changed my map file to: "/DownloadProfitAcctCat": { "GET": { "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "entity": { "name": "UploadProfitAcctCat", "function": "DownloadAcctCat", "arg": [ { "ablName": "", "ablType": "INTEGER", "ioMode": "RETURN", "msgElem": {"type": "StatusCode", "name": null} }, { "ablName": "poMemptr", "ablType": "CLASS OpenEdge.Core.Memptr", "ioMode": "OUTPUT", "msgElem": {"type": "BODY", "name": null} } ] } } } The method is now: METHOD PUBLIC INT DownloadAcctCat(OUTPUT poMemptr AS OpenEdge.Core.Memptr): DEF VAR cTmpXlsx AS CHAR NO-UNDO. DEF VAR memptrTmp AS MEMPTR NO-UNDO. cTmpXlsx = "Test.xlsx". COPY-LOB FROM FILE cTmpXlsx TO memptrTmp. poMemptr = NEW Memptr(GET-SIZE(memptrTmp)). poMemptr:PutBytes(memptrTmp). SET-SIZE(memptrTmp) = 0. RETURN 200. END METHOD. Now, my contents of the download file are correct but the file name is "DownloadProfitAcctCat.xlsx". Since I'm now returning a Memptr, how do I set the Content-Disposition? Louis

Continue reading...
 
Status
Not open for further replies.
Back
Top