Hello, I’m trying to use csvtojson. I use it with my local file it worked. Example:
const csvFile = await csv().fromFile('./cloud/controllers/a.csv')
If i want to do that with parse file path i had this error :
“error”: “File does not exist. Check to make sure the file path to your csv is correct.”
Here is my code:
Parse.Cloud.define('trying', async req => {
try {
const query = new Parse.Query('File')
const data = await query.get('4234ASxohU')
const file = data.get('file')
await file.getData()
const csvFilePath = file._requestTask.path;
//csvFilePath get me this : "/7VnTkgxVQQHBKmoPe6Ijn0kubLC9lZtc1tEcCw7C/987adf2e257e2d64104eac38829549eb_deneme.csv"
const csvFile = await csv().fromFile(csvFilePath);
return csvFile;
} catch (error) {
throw error;
}
});