RestClient tries to be smart when it detects a file and treat the remaining arguments as other parts in the multipart request. So you just need to separate the content from the headers by change it into a hash.
Try this:
response = RestClient.post "URL",
{"myfile" => File.new("/path/to/file")},
"Cookie" => "Name=michal",
"X-SESSION-ID" => "dsafasdfadsfadsfasfdadf",
"User-Agent" => "UNknow",
"connection" => "Keep-Alive"