Navigation Menu

Skip to content

Commit

Permalink
Use curl instead of github_api
Browse files Browse the repository at this point in the history
Because github_api's upload doesn't work... :<
  • Loading branch information
kou committed Mar 29, 2012
1 parent eb3bb1e commit 184fe07
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tools/upload-to-github.rb
Expand Up @@ -26,5 +26,17 @@
:size => File.size(file),
:description => File.basename(file),
:content_type => content_type)
github.repos.upload(resource, File.basename(file))
p resource

system("curl",
"-F", "key=#{resource.path}",
"-F", "acl=#{resource.acl}",
"-F", "success_action_status=201",
"-F", "Filename=#{resource.name}",
"-F", "AWSAccessKeyId=#{resource.accesskeyid}",
"-F", "Policy=#{resource.policy}",
"-F", "Signature=#{resource.signature}",
"-F", "Content-Type=#{resource.mime_type[0]['Content-Type']}",
"-F", "file=@#{file}",
resourec.s3_url)
end

0 comments on commit 184fe07

Please sign in to comment.