When posting/uploading a document to Content Server using REST API, we've noticed that under the properties on the version tab the uploaded file contain the full path of the original document location as a 'File Name' (i.e. C:\Users\UserName\Desktop\SomeFolder\NameofDoc.docx ) instead of the name, only.
It's worth mentioning that this only occurs when uploading files using IE not Chorme.
Below is the code that handles the upload:
function upload( files,i ) {
var bodyData = {
type: 144,
parent_id: 1010101, // parent ID
name: files[i].name,
roles: {
categories: {
{
"1234567": { // category
"1234567_2": "test" // attribute
}
}
}
}
},
formData = new FormData();
formData.append( "body", JSON.stringify( bodyData ) );
formData.append( "file", files[i] );
return $.ajax( {
type: "POST",
url: ".../api/v1/nodes",
data: formData,
headers: { otcsticket: otcsticket }
}).then( function ( response ) {
... succeeded
}, function ( jqxhr ) {
... failed
});
}
Would any one know how to avoid this issue or whether there is a patch to hide the document path?
Thanks in advance for all your help.
Alban