https://github.com/wd/emacs.d/blob/mast ... l-paste.el
上传图片到 paste.ubuntu.org.cn
使用 curl 命令上传图片:
代码: 全选
$ curl -F [email protected] -F paste=1 http://paste.ubuntu.org.cn
$ echo $?
0
但是 curl 没有返回上传后的 url 不知道这个是什么问题
谢谢!
代码: 全选
$ curl -F [email protected] -F paste=1 http://paste.ubuntu.org.cn
$ echo $?
0
@ee 我用的 gentoo 不是 debian系,主要是想学习用 curl 提交图片eexpress 写了:有Paste-img的deb
代码: 全选
$ curl -v -F [email protected] -F paste=1 http://paste.ubuntu.org.cn
* About to connect() to paste.ubuntu.org.cn port 80 (#0)
* Trying 198.71.86.201...
* Connected to paste.ubuntu.org.cn (198.71.86.201) port 80 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: paste.ubuntu.org.cn
> Accept: */*
> Content-Length: 31419
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------4776cac6af8e
>
< HTTP/1.1 100 Continue
< HTTP/1.1 302 Moved Temporarily
< Server: nginx/1.1.19
< Date: Thu, 02 May 2013 01:52:20 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/5.3.10-1ubuntu3.6
< Set-Cookie: PHPSESSID=2kcm7b7abjbqhichv1bc7d5pm6; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Location: /205197
* HTTP error before end of send, stop sending
<
* Closing connection 0
他的意思是那个deb是他写的, 可以看源代码, 里面有如何上传图片VolcanoX 写了:@ee 我用的 gentoo 不是 debian系,主要是想学习用 curl 提交图片eexpress 写了:有Paste-img的deb这个是提交过程的提示信息代码: 全选
$ curl -v -F [email protected] -F paste=1 http://paste.ubuntu.org.cn * About to connect() to paste.ubuntu.org.cn port 80 (#0) * Trying 198.71.86.201... * Connected to paste.ubuntu.org.cn (198.71.86.201) port 80 (#0) > POST / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: paste.ubuntu.org.cn > Accept: */* > Content-Length: 31419 > Expect: 100-continue > Content-Type: multipart/form-data; boundary=----------------------------4776cac6af8e > < HTTP/1.1 100 Continue < HTTP/1.1 302 Moved Temporarily < Server: nginx/1.1.19 < Date: Thu, 02 May 2013 01:52:20 GMT < Content-Type: text/html < Transfer-Encoding: chunked < Connection: keep-alive < X-Powered-By: PHP/5.3.10-1ubuntu3.6 < Set-Cookie: PHPSESSID=2kcm7b7abjbqhichv1bc7d5pm6; path=/ < Expires: Thu, 19 Nov 1981 08:52:00 GMT < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Pragma: no-cache < Location: /205197 * HTTP error before end of send, stop sending < * Closing connection 0