inheritSharings

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


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


Parameters:
wipIdList: List of Salesforce.com 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);

UploadRequestInfo

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;}

 

ResultObject

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