I am using java google drive api to upload files. My problem is after uploading files i did not find uploaded files from my google drive. How can i see that files in web browser. Any idea for that please help me?
My java code is :
HttpTransport httpTransport = new NetHttpTransport();
JsonFactory jsonFactory = new JacksonFactory();
try {
GoogleCredential credential = new GoogleCredential.Builder().setTransport(httpTransport).setJsonFactory(jsonFactory).setServiceAccountId(IRingeeConstants.SERVICE_ACCOUNT_EMAIL)
.setServiceAccountScopes(Collections.singleton(DriveScopes.DRIVE)).setServiceAccountPrivateKeyFromP12File(new java.io.File("G:\\Ringee-1a1f1b786226.p12")).build();
Drive service = new Drive.Builder(httpTransport, jsonFactory, credential).setApplicationName(IRingeeConstants.APPLICATION_NAME).build();
printAbout(service);
File body = new File();
body.setTitle("ringeeprofileimage");
body.setDescription("ringeeapp");
body.setMimeType("application/vnd.google-apps.folder");
java.io.File fileContent = new java.io.File("G:\\document.txt");
FileContent mediaContent = new FileContent("text/plain", fileContent);
File file = service.files().insert(body, mediaContent).execute();
System.out.print("file id is :" + file.getId());