I Want to upload the document into Sharepoint Folder.
Below are my observation and Progress
Below Is the Code That I have Tried.
File baseDir = new File(ApplicationProperties.getInstance().getAttachmentUploadBaseDirPath());
if (!baseDir.exists()) {
baseDir.mkdir();
}
File complaintDir = new File("https://apps.companyname.com/sites/Shared Documents/Test" + "\\" + complaintNumber);
if (!complaintDir.exists()) {
complaintDir.mkdir();
}
file = new File(complaintDir + "\\"+ filename);
fos = new FileOutputStream(file);
I did some digging and finally got my answer. Steps which I followed:
Happy Coding! Thanks.