I don't know how to upload MP4 images from an Android device to Parse.com.
File file=newFile(path);
try{
byte[] data=FileUtils.readFileToByteArray(file); // Convert any file, image or video into byte array
ParseFile Pfile = new ParseFile("sample.mp4", data);
Pfile.saveInBackground();
ParseObject jobApplication = new ParseObject("JobApplication");
jobApplication.put("applicantName", "Joe Smith";
jobApplication.put("applicantResumeFile", Pfile);
jobApplication.saveInBackground();
} catch(IOExceptione){
e.printStackTrace();
}
As Shirone said, we cannot transfer more than 10MB of files.Let's keep the exception in mind you.
Also,
byte[]data=FileUtils.readFileToByteArray(file);\
© 2024 OneMinuteCode. All rights reserved.