Is there a way I can assign the associative array elements to a variable in the .rsp file?
E.g. m_cTmpStr = _files[i].tmp_name
The above returns me an “Unrecognized phrase/keyword near column 32” error
I am trying to move the uploaded file to another location, since I am having problem using the _files.tmp_name as a memory var, I used the following temp workaround in .rsp :
copy file ‘C:\lianja\cloudserver\tenants\public\wwwroot\My_T emp_Name.jpg’ to “C:\lianja\cloudserver\tenants\public\wwwroot\myTa rgetFolder\My_Perm_Name.jpg’
Being able to access the _files.tmp_name will be ideal, as the program will need the filename and extension to move to the correct location. Anybody has any luck assigning the _files into temp memory variables?
To access tmp_name store _FILES to a new array:
myfilearray = _FILES
m_cTmpStr = myfilearray.tmp_name
tried running a dos command in the rsp to scale an image, with the following codes:
m.cArg = “c:\mydoscommand\myimagescaling.exe C:\lianja\cloudserver\tenants\public\wwwroot\_myim ages\_upload_000022f4_3.jpg /scale=(800,600)”
I can execute the above 2 lines in the console to successfully scale the image.
But when i run the browser, the uploaded image does not get scale.
Lianja.run() is not supported in web and mobile.
I believe this is a security precaution: running system commands from a server connected to the web is a major security risk.
I would suggest seeing if you can run execPython in an RSP page (I’m thinking not, but it’s worth a try). There are Python libraries readily available for scaling images.
When using VFP for server side scripting of functions and/or RSP pages, can you instantiate and use VFP class libraries to perform work?
Most of our current code base in held in straight prg class libraries and I’m assuming we can utilise these classes within Lianja.
Yes you can use both procedure libraries and class libraries in server side rsp pages.
Generating JSON using a single sql statement is trivial.