博客园MetaWeblog API测试
这是base64编码的网页链接内嵌图片, 浏览器可打开(新标签页中)可证明文件内容没有问题
这是图片链接
仍然不行。这是前端函数序列化后的提交的完整的xml数据
点击查看代码
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newMediaObject</methodName>
<params>
<param>
<value>
<string>188840</string>
</value>
</param>
<param>
<value>
<string>lywon</string>
</value>
</param>
<param>
<value>
<string>1C2379AB79E66480E8C9ED4A75BE80D3F66571C989D2EAC93557BA77DAA03B1A</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>base64</name>
<value>
<string>/9j/2wCEAAICAgICAgICAgIDAgICAwQDAgIDBAUEBAQEBAUGBQUFBQUFBgYHBwgHBwYJCQoKCQkMDAwMDAwMDAwMDAwMDAwBAwMDBQQFCQYGCQ0LCQsNDw4ODg4PDwwMDAwMDw8MDAwMDAwPDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/dAAQADf/uAA5BZG9iZQBkwAAAAAH/wAARCABkAGQDABEAAREBAhEB/8QAmQAAAgMAAwEBAAAAAAAAAAAABgcFCAkCAwQKAAEAAQUBAQAAAAAAAAAAAAAABAIDBQYHAQAQAAIBAwMDAgUDAwQBBQAAAAECAwQFEQAGIQcSMRNBCBQiUWEjMnEVQoEWUpGxJRckcsHhEQACAgEDAwIEBQQDAQAAAAABAgADEQQSIQUxQVFhBhMUIjJxgZGxI0Kh0SRi4cH/2gAMAwAAARECEQA/AGDZxlUA4PGsF1XcTe0OYYIMD7ZGMf50NiItrDTzXTdNm27TCovNyhoFbPptI3aCEHP8Aa6KWs4QEmCPXj8ohNz/ABddMtvNVQUM9z3DWU4GKelpAKaQnnIqS/YP+9TWm+FtbbhtoAPr/qRl/UKKvf8AKV33T8b+96uH0dqW2OxyEFXq6zsnMbE/T2oFH7RgqWJ988eJ7S/B6A5uJIHoMSKu6qpH2KIvI/jd6zRmnarqbdOIcev3U4jM4Ge4t2nCjwMDydSB+D9Jjz+8CXrd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NjBR5g2o1IoXd+0N56WltlFDbqJe0Bsu58lj5Zj7k6sFNFda7V7yrXXNadzSJpqSFK5jKwRGQyyNjOO3A7uNOMMRskngTqq7GrGqihkxFI5amnRQxKOM57TwM8jn86YYZEeBKiCa9PqBO706ms7nYtM8JRVZz5YgqecY8aa+nz2Ajn1NnqZ//0wFOU591zrMR3m0t2nQ6KFHGcn30SDnEFc5MgqylhEhIX2B05FA4WTNAg9Snh57JJERh+GYA/wDevHxElziXmsHTPadsv1spaWjcNcEDy1jMDOhMZJ9N+36MhO049ifc51YNPoalGQOZUNX1G455j4paCGio7bQRtJLDCgRDK3cwCrkDOB48DU/pV29pX7HJ5hXaUSfvpJ0Wenxj0ZB3Lj/OpE1q6EMMyNa1qfuTg5njvdnorbUU/wAorIsiBghOQvvhSecfydQWqqVDke0sfTr2try0YNhgjp7NBURj9aqLGZzyePGP41J6NAEDY5MieoWM1uCeBPJJmWp/UJfByM6MXvI950T4AuBAGVjjQfwzgHXrThY6gywE41mYEqZIycxRd6AngFcnx+SOdCA4j1qgYiyr71cJZY5jN2maMOUXhVySMKPtxpW8xmf/2Q==</string>
</value>
</member>
<member>
<name>name</name>
<value>
<string>testFanbingbing.jpg</string>
</value>
</member>
<member>
<name>type</name>
<value>
<string>image/jpeg</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
XML-RPC简单理解与博客园的MetaWeblog协议
http://xmlrpc.com/spec.md
https://github.com/xml-rpc-el/xml-rpc-el
点击查看代码
(require 'xml-rpc)
xml-rpc
(xml-rpc-method-call "https://rpc.cnblogs.com/metaweblog/lywon" "metaWeblog.newMediaObject" "188840" "lywon" "1C2379AB79E66480E8C9ED4A75BE80D3F66571C989D2EAC93557BA77DAA03B1A" '(("bits" . (:base64 "/9j/2wCEAAICAgICAgICAgIDAgICAwQDAgIDBAUEBAQEBAUGBQUFBQUFBgYHBwgHBwYJCQoKCQkMDAwMDAwMDAwMDAwMDAwBAwMDBQQFCQYGCQ0LCQsNDw4ODg4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jp7NBURj9aqLGZzyePGP41J6NAEDY5MieoWM1uCeBPJJmWp/UJfByM6MXvI950T4AuBAGVjjQfwzgHXrThY6gywE41mYEqZIycxRd6AngFcnx+SOdCA4j1qgYiyr71cJZY5jN2maMOUXhVySMKPtxpW8xmf/2Q==")) ("name" . "testFanbingbing.jpg") ("type" . "image/jpeg")))
(("url" . "https://img2023.cnblogs.com/blog/642848/202304/642848-20230429191141325-2028748412.jpg"))
(("url" . "https://img2023.cnblogs.com/blog/642848/202304/642848-20230429191005437-1991160354.jpg"))
base64被编码两次和被换行显示了
点击查看代码
;; 打开文件获得原始二进制数据
(save-excursion
(save-restriction
(with-current-buffer (find-file-noselect "D:\\documents\\Pictures\\美女头像\\1.jpg" nil t)
(fundamental-mode)
(setq filedata (encode-coding-string (buffer-string) 'binary))
(kill-buffer)
)
))
;; 尝试使用二进制数据、避免'(:base64 filedata)的值被再次base64编码
(xml-rpc-method-call "https://rpc.cnblogs.com/metaweblog/lywon" "metaWeblog.newMediaObject" "188840" "lywon" "1C2379AB79E66480E8C9ED4A75BE80D3F66571C989D2EAC93557BA77DAA03B1A" '(("bits" . (:base64 filedata)) ("name" . "testFanbingbing.jpg") ("type" . "image/jpeg")))
(base64-encode-string filedata t) ;; t 表示不截断
;; 但metaweblog中的上传文件metaweblog-upload-file和xml-rpc-method-call都是截断的base64编码
(xml-rpc-value-to-xml-list '(:base64 filedata)) ;;出错的位置
;;不能识别是string类型、但下面又能成功、真的很疑惑
(stringp filedata)
t
;;测试org2blog对wordpress能够正常上传图片、但不能是D:/这样的绝对路径非则会上传图片会出错
;;使用的是metaweblog的upload和metaweblog-getfileproperties、metaweblog-upload-file