Пример #1
0
        public static void UploadFileForDownload()
        {
            var download = new Download()
            {
                Name  = "API Test File",
                Title = "API Test File Title"
            };

            var bytes = Encoding.ASCII.GetBytes("test file");

            download.AddAttachment(Service, bytes, "text/plain", "readme.md");

            if (download.ApiCallResponse.HasException)
            {
                throw new Exception(download.ApiCallResponse.ExceptionDetails);
            }
        }