2017-06-14 131 views
2

我正在嘗試將文檔添加到confluence頁面。使用PowerShell將文件上傳到Confluence

我使用這個代碼:

E:\APP\"curl-7.53.1"\src\curl.exe -v -S -u user:password -X POST -H "X-Atlassian-Token: no-check" -F "[email protected]:\Users\srvc_mdw_dev\Desktop\conf.txt" -F "comment=this is my file" "http://example.net/rest/api/content/36375143/child/attachment" 

,但我得到以下錯誤:

PS E:\PowerShell\script> ./conf 
Note: Unnecessary use of -X or --request, POST is already inferred. 
* timeout on name lookup is not supported 
* Trying IPaddress... 
* TCP_NODELAY set 
* Connected to example.net (ip address) port 80 (#0) 
* Server auth using Basic with user 'user' 
> POST /rest/api/content/36375143/child/attachment HTTP/1.1 
> Host: example.com 
> Authorization: Basic c291aGFpbC5vdWFiaUBtZXRyb2V4dGVybmFsLmZyOm1ldHJvNDU2Kg== 
> User-Agent: curl/7.53.1 
> Accept: */* 
> X-Atlassian-Token: no-check 
> Content-Length: 333 
> Expect: 100-continue 
> Content-Type: multipart/form-data; boundary=------------------------646f724e33da0066 
> 
* HTTP 1.0, assume close after body 
< HTTP/1.0 302 Found 
< Location: https://example.net/rest/api/content/36375143/child/attachment 
< Server: BigIP 
* HTTP/1.0 connection set to keep alive! 
< Connection: Keep-Alive 
< Content-Length: 0 
* HTTP error before end of send, stop sending 
< 
* Closing connection 0 

難道有人知道爲什麼我有這樣的錯誤?謝謝

回答