public BeginUploadResponse BeginUpload(BeginUploadRequest request) { var cache = ServiceHelper.Cache; var uploadOptions = request.Options; if (uploadOptions == null) { uploadOptions = new UploadDocumentOptions(); } if (string.IsNullOrEmpty(uploadOptions.DocumentId) && !string.IsNullOrEmpty(request.DocumentId)) { uploadOptions.DocumentId = request.DocumentId; } uploadOptions.Cache = cache; Uri uploadUri = DocumentFactory.BeginUpload(uploadOptions); return(new BeginUploadResponse { UploadUri = uploadUri }); }