We are trying to upload a file to aspose-cells pod from backend pod. We are using on Premise approach. Please see below axios call that we are making for the same(replace namespace) :
let data = new FormData();
const baseUrl = 'http://aspose-cells-cloud.<nameSpace>.svc.cluster.local';
if(!stream) {
stream = fs.createReadStream(inputFilePath); // inputFilePath is received as arguement
}
data.append('File', stream);
let config = {
method: 'put',
url: baseUrl + '/v3.0/cells/storage/file/%2Fdata%2F' + inputFileName + '?storageName=First%20Storage',
headers: {
'accept': 'application/json',
'Content-Type': 'multipart/form-data',
...data.getHeaders()
},
data: data
};
await axios(config)
.then(function (response) {
console.log('aaa', response);
if (response.status === 200) {
logger.info(`File uploaded successfully.`);
}
else {
logger.error(`Error while uploading file. Response Status Code: ${ response.status }`)
}
})
.catch(function (error) {
throw error;
});
We are getting 200 ok but in the response.data we are also getting errors in the array. When we console log the errors array we got following response:
Errors: [
{
Code: 'errorLocalStorage',
Message: "Local Storage exception: Access to the path '/data/qqqqq.xlsx' is denied.",
Description: 'Operation Failed. Permission denied',
InnerError: [Object]
}
]