I have a file. I want to upload that file as Parse.File. I know its path.
I tried reading file and converting bufer to base64 but I get invalid file uplaod error.
var fileBuffer = fs.readFileSync(path);
var media64 = fileBuffer.toString('base64');
var mainmedia = new Parse.File(user.id, { base64: media64 },mimeInfo.mime);
How can I upload file with its path?