public string SaveAttachment(AttachmentRequest request) { try { DropNetClient _client = new DropNetClient(AppConstants.DropboxClientId, AppConstants.DropboxClientSecret); _client.UserLogin = Storage.Dropbox.Token; DropNet.Models.UserLogin login = _client.GetAccessToken(); Attachment attachment = AppUtility.GetAttachment(request.AttachmentId, request.AuthToken, request.EwsUrl); _client.UploadFile("/", attachment.AttachmentName, attachment.AttachmentBytes); return("Uploaded Sucessfully."); } catch (Exception s) { return(s.Message); } //return ""; }
public string SaveAttachment(AttachmentRequest request) { try { Attachment attachment = AppUtility.GetAttachment(request.AttachmentId, request.AuthToken, request.EwsUrl); return(SaveAttachment(attachment)); } catch (Exception e) { return("There was an exception: " + e.Message + "\n\n" + e.StackTrace); } }
public string SaveAttachment(AttachmentRequest request) { try { DriveRestClient restClient = new DriveRestClient(AppConstants.GoogleDriveClientId, AppConstants.DropboxClientSecret, googledriveRedirectUrl.ToString()); restClient.Token = Storage.GoogleDrive.Token; AttachmentsDemoWeb.Constants.Attachment attachment = AppUtility.GetAttachment(request.AttachmentId, request.AuthToken, request.EwsUrl); string uploadText = restClient.UploadFile(attachment.AttachmentName, attachment.AttachmentBytes); return("Uploaded Sucessfully."); } catch (Exception s) { return(s.Message); } //return ""; }