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

Sirportly uploading attachment #3

Open
arunmv opened this issue Mar 18, 2014 · 1 comment
Open

Sirportly uploading attachment #3

arunmv opened this issue Mar 18, 2014 · 1 comment

Comments

@arunmv
Copy link

arunmv commented Mar 18, 2014

We are using sirportly version 1.2.7
While calling sirportly api,
http://sirportly.com/docs/api-specification/tickets/uploading-attachments

we are getting a 400 bad request error.

We successfully executed the curl command which is provided in api.

in ticket.rb
# Allows you to upload attachments to existing ticket updates. Accepts a hash of parameters needed to create the attachment.
def add_attachment(params = {})
if req = client.request('tickets/add_attachment', format_params(params))
true
else
false
end
end

@upload = ticket.add_attachment(:ticket =>"FZ-387470", :update =>"8190628", :file =>"home/abc.jpg") ,

 these are params which we are passing.
@juseveno
Copy link

Hi,

Should work with
upload = ticket.add_attachment(:ticket =>"FZ-387470", :update =>"8190628", :file => UploadIO.new("home/abc.jpg", 'image/jpg'))

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

2 participants