Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating a ticket with attached file, the file is still encoded when downloaded from the web ui #91

Open
raulcabero opened this issue Mar 31, 2015 · 0 comments

Comments

@raulcabero
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant