Ejemplo n.º 1
0
        public async Task <Guid> SendFileAsync(Stream document, string filename, string destinationFolder)
        {
            var url     = FileMetadata.AsQueryStringUrl("documents", filename, destinationFolder);
            var content = new StreamContent(document);

            var response = await _client.PostAsync(url, content);

            var documentResponse = await response.Content.ReadAsAsync <DocumentResponse>();

            return(documentResponse?.document_guid ?? Guid.Empty);
        }