This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
I tried to hard-code the absolute url of an image in the xml template but in the log trace, it seems to append the value of file attribute to the jsm instance folder. [attached a screenshot]
Thank you in advance,
Faridah
Attachments
log trace for image file.PNG (13.3 KiB) Viewed 5518 times
Define_Com Class(#XPRIM_HttpRequest) Name(#Request) Scope(*Application)
#VF_ELTXTX := 'https://images.pexels.com/photos/614484/pexels-photo-614484.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1'
#Request.DoPost Url(#VF_ELTXTX)
* The response is an image file, lets move it to a file
#STD_BLOB := #Request.Response.AsFile
#STD_STRNG := #STD_BLOB.FileName
then use #STD_STRNG for the image in your xml document and it will be pointing to the image in a temporary folder.
Thank you for your response.
I have tried the solution you mentioned.
The weird thing is, when I use the #request.DoPost in a test form, I get a value for the filename.
But when I add the same code to the actual function or reusable part, I am getting a blank value for the filename.
Could there be an authority issue in Integrator with regards to the domain being used in the URL I pass to #rerquest.DoPost?