I am trying to upload csv file to geoprocessing service, everything works fine if I replaced the URL and uploaded the file to any GP service published by ESRI but when I try to upload to my local GP service it fails. I am using ArcGIS Server 10.4.1 but I'm not sure what did I miss to configure in my service.
var UploadURL="https://MyServer/arcgis/rest/services/Density/GPServer/uploads/upload";
//var UploadURL="http://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/GPServer/uploads/upload";
esriConfig.defaults.io.corsEnabledServers.push(UploadURL);