Posted on 03-26-2020 10:46 AM
I am having trouble uploading an icon to an app. The icon file exists and I have rights to it. Other API calls work normally to the app... I can even update the version and description. I have tried with jpg and png. The original jpg was downloaded directly from Apple based on the url in the App Store json for the app. I've also tried different locations for the icon file.
Everything I do gives me this error:
<html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Conflict</p>
<p>Unable to complete file upload. No file found for the upload.</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
Here's the command I'm using:
curl -k -u ${JSSUSER}:${JSSPASS} -X POST https://jamf.domain.com:8443/JSSResource/fileuploads/mobiledeviceapplicationsicon/id/${APPID} -F name=@"/tmp/icon.png"
Posted on 03-26-2020 01:10 PM
Curl's verbose info shows the Content-Length as 19752 which is correct. That tells me that the file was found and read.
Posted on 04-01-2020 01:20 PM
Found that the issue only occurs when going through our load balancer. Now to figure out what HAProxy is doing to the upload.
Posted on 04-02-2020 10:42 AM
I found the issue. The HAProxy setting 'option http-server-close' was closing off the multipart form-data before it finishes uploading. I changed the settings to use 'option http-keep-alive' and 'timeout http-keep-alive 3000' to give the sessions enough time to upload before closing. So far it's working.