Operation aborted by callback

I’m using CURL within a php script to upload files, but keep getting “operation aborted by callback” error.

Any suggestions what could be causing it?

Here is my uploadFile function