Closed stepheneb closed 12 years ago
No, that's actually exactly how you do it. What error(s) are you seeing?
I've put the code and response in the console here: https://gist.github.com/2198834
Curious, did you ever get this to work? I can't figure out what the issue is here. The error is confusing, because on line 59 you are passing 2 arguments even though it's claiming you're only passing 1.
I haven't got back to it yet. Probably will in the next two weeks. I did get this response from github support. When I add uploading project artifact scripts to our work I'll take a look at this suggestion and perhaps my original code. If I find out what was wrong with my earlier script I'll update this thread.
From: Rick (GitHub Staff) Subject: Ruby example for uploading to repo downloads
Sure, this is using my Faraday gem (0.8)
It would be helpful if there were something in the README about non-file params. Like stepheneb said above - I was pretty sure that's not how to add more parameters into the multipart post. I spent a lot of time browsing the methods trying to figure it out - but yes, it's just that easy.
Hi Nick,
This really just a support request (don't think it is a bug) ... if you have time to answer or sample code to point me to.
I'm working on making a script to take my gh-pages branch and upload itto github
They use a two part POST technique described here: http://developer.github.com/v3/repos/downloads/
Here's some of my code -- the first POST using HTTParty works and I get back valid json.
This is the part that doesn't work:
I'm pretty sure thats NOT how to add the extra parameters for the multipart post -- but I didn't see an example combining the file and the other form' elements.
Thanks for any help!