Hi Jared,
I've created the following example to upload a file using an Ajax function to HCP. It works fine in my lab, hopefully you can use this example to resolve the issue in your environment.
=====================================================
<html>
<head>
<title>Javito HCP test - Upload file</title>
<meta charset="utf-8">
<script src="js/jquery-3.5.1.min.js"></script>
</head>
<body>
<form id="formuploadajax" method="post" >
<br>
<input type="file" id="archivo1" name="archivo1"/>
<input type="submit" value="Upload File" name="submit">
</form>
<script>
$(function(){
$("#formuploadajax").on("submit", function(e){
e.preventDefault();
var file = $('#archivo1')[0].files[0];
$.ajax({
url: "http://javito.javito.hcp.javito.lab/rest/" + file.name,
type: "PUT",
headers: ({"Authorization": "HCP YWRtaW4=:1aa4c4552dbb438d9d46c15d93bbbbbf"}),
data: file,
cache: false,
contentType: false,
processData: false,
success: function (data) {
alert("Upload OK");
},
error: function(err){
alert("Upload Failed");
}
})
});
});
</script>
</body>
</html>