IOException when used in uploadFile Component

Hi all ,

I'm creating an API where I can upload a file from Ignition for processing.

The issue is, when I run this function from the script console it works as expected.

The API currently returns the json data in the request body as the response.

When I try and run the same script in the fileUpload Component I get a IOException Error.

Error running action 'component.onFileReceived' on Audit Log/TestUpload@D/root/FileUpload: Traceback (most recent call last): File "<function:runAction>", line 3, in runAction File "<module:Utilities.customFunctions>", line 24, in getAPIData at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send( at at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) Unable to POST

Here is the function

def getAPIData():
	client =
	return response is localhost. Is the gateway running on the same computer as you're executing your test in the script console? Does it have the same service running? Is it also running on port 5000?