softlayer-ruby
softlayer-ruby copied to clipboard
When creating a ticket with attached file, the file is still encoded when downloaded from the web ui
I use the following code to create the ticket
username = 'set me'
key = 'set me'
path = "C:\\test.xlsx"
name = "framework.xlsx"
contents = 'Test Ticket Please Close at your earliest convenience'
file = File.open(path,'rb') { |io| io.read }
encode = Base64.encode64(file)
attachedFiles = [
{
'data' => encode,
'filename' => name
}
]
template = {
'subjectId' => 1522,
'contents' => contents,
'assignedUserId' => 205832,
'title' => "Test Ticket Please Close at your earliest convenience"
}
client = SoftLayer::Client.new( :username => username,:api_key => key)
ticket_service = client['SoftLayer_Ticket']
new_ticket = ticket_service.createStandardTicket(template, contents, 0, '', '', '', attachedFiles)
but when I download the file from the softlayer's portal the file is still encoded