BillableHoursWebApp.Common.DropboxHelper.UploadFileEntry C# (CSharp) Method

UploadFileEntry() public method

public UploadFileEntry ( Stream stream, string cloudDirName = "/Invoices/" ) : string
stream Stream
cloudDirName string
return string
        public string UploadFileEntry(Stream stream, string cloudDirName = "/Invoices/")
        {
            IResource res = new StreamResource(stream);
            var fileEntry = this.dropbox.UploadFileAsync(res, cloudDirName).Result;

            var shareableLink = dropbox.GetShareableLinkAsync(fileEntry.Path).Result;
            return shareableLink.Url;
        }