Exemplo n.º 1
0
        private IRestRequest AddFile(FileParameter file)
        {
            Files.Add(file);

            return(this);
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Adds the bytes to the Files collection with the specified file name
 /// </summary>
 /// <param name="name">The parameter name to use in the request</param>
 /// <param name="bytes">The file data</param>
 /// <param name="fileName">The file name to use for the uploaded file</param>
 /// <param name="contentType">The MIME type of the file to upload</param>
 /// <returns>This request</returns>
 public IRestRequest AddFile(string name, byte[] bytes, string fileName, string contentType = null)
 {
     return(AddFile(FileParameter.Create(name, bytes, fileName, contentType)));
 }