//File upload in google drive DocumentListEntry uploadFile = new DocumentListEntry(); uploadFile.setTitle(new PlainTextConstruct("FILE_NAME_DISPLAY_IN_DRIVE")); uploadFile.setFile(new File("FILE_PATH"), "MIME_TYPE_OF_FILE"); uploadFile = docsService.insert(GOOGLE_DRIVE_FEED_URL, uploadFile);
/** * Associate a File with this entry, implicitly determining the mime type * from the file's extension. * * @deprecated use setFile(File, String) instead. */ @Deprecated public void setFile(File file) { setFile(file, getMimeTypeFromFileName(file.getName())); }
/** * Associate a File with this entry, implicitly determining the mime type * from the file's extension. * * @deprecated use setFile(File, String) instead. */ @Deprecated public void setFile(File file) { setFile(file, getMimeTypeFromFileName(file.getName())); }
/** * Associate a File with this entry, implicitly determining the mime type * from the file's extension. * * @deprecated use setFile(File, String) instead. */ @Deprecated public void setFile(File file) { setFile(file, getMimeTypeFromFileName(file.getName())); }