09-11-2023 05:36 PM
I am using the code from https://forums.ni.com/t5/LabVIEW/Upload-file-with-LabVIEW-webservices/td-p/3172070 to upload a file to a LabVIEW web service. After submitting the form, in the browser window, I received the response
{"PermaPathArray":["C:\\Users\\Public\\Documents\\IMG_9416.JPG"],"size(s)":1,"TempPathArray":["C:\\Users\\XXXX\\AppData\\Local\\Temp\\2B37UAKR66T72V8A\\WebServices\\temp\\tmp4_3_1.tmp"]}
The file is uploaded to the data server, but I am unsure of how to proceed from here, as the browser is now viewing
http://127.0.0.1:8001/MyWebService/upload
instead of the sending HTML file http://127.0.0.1:8001/MyWebService/upload.html.
I have also tried something similar using a Fetch command in JavaScript with a POST method but get the same response.
Any help would be greatly appreciated.
Solved! Go to Solution.
09-12-2023 03:03 PM
Need to reply with a redirect status (307 probably most likely) and set a header value of the location to redirect to.
09-12-2023 05:07 PM
It is a 301 response code on the Set HTTP Redirect.vi with the link to the web page you want to go to after processing.
Thank you for your help with this.