• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

This article was migrated from http://rails.office.drecom.jp/hibi/archive/34

備忘録。
ファイルの内容をbase64にしてどうやって渡していいか悩んだ。
Base64オブジェクトを渡すのねん。
わかったら、はぁ、ちゃんと読んでって感じ。

file = File.open(file_path).readlines.join('')
base64 = XMLRPC::Base64.new(file)
file_hash = {:name => file_name, :bits => base64}

image = client2.call2('metaWeblog.newMediaObject',blog_id, blog_user, blog_password, file_hash)
p image[1]["url"]

http://rails.office.drecom.jp/hibi/archive/34

This article was migrated from http://rails.office.drecom.jp/hibi/archive/34

posted by Png satoko on Wed 22 Nov 2006 at 04:17

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry170
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ