This method is used to inherit the sharings from parent folder to the file.

void inheritSharings(List<String> wipIdList, String currentFolderId)

wipIdList: List of IDs of "file" records(either attachments or S-Drive Folder files) as a String.
currentFolderId: Id of the parent folder of the file for sharing.

Example code:

List<String> wipIdList = new List <String>();
wipIdList .add(uploadRequestInfos .fileWipId);
cg.SDriveTools.inheritSharings(wipIdList, currentFolderId);


String fileName{get; set;}
String fileLocation{get; set;}
String fileSize{get; set;}
String fileType{get; set;}
String wipFileId{get; set;}
String signature{get; set;}
String policy{get; set;}


String status {get;set;}// success – fail
String errorMessage {get;set;} // null if status is success
String wipFileId {get;set;} // to see which file failed