All: I'm struggling to get a PutFile to work. (See verbose output
below; admin_key blanked out). I'm working with a v2 wiki and believe
I have it API-enabled (checked 'Enable developer interface' on my wiki
settings) and am using the correct admin_key. I'm using curl on a
Windows XP Pro machine.
curl -v -Fdata=@curl.txt
http://bennbrian.pbwiki.com/api_v2/ -
Fop=PutFile -Fadmin_key=*****************
* About to connect() to
bennbrian.pbwiki.com port 80 (#0)
* Trying 208.96.32.3... connected
* Connected to
bennbrian.pbwiki.com (208.96.32.3) port 80 (#0)
> POST /api_v2/ HTTP/1.1
> User-Agent: curl/7.19.2 (i386-pc-win32) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3 libidn/1.11 libssh2/0.18
> Host:
bennbrian.pbwiki.com
> Accept: */*
> Content-Length: 127712
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------a43091f80dd4
>
* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Date: Sat, 10 Jan 2009 18:24:43 GMT
< Server: Apache
< Vary: Accept-Encoding,Use
< Set-Cookie: pbj=efc4d56c02fc54c5b3ef0e6d1f95001231611885;
expires=Fri, 01-Jan-2038 00:00:00 GMT; path=/; domain=.
pbwiki.com
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: application/json
<
/*-secure-
{"_auth_role":"admin","_auth_via":"api_key","_not_checking_inputs":true,"_perm_cache_times":
{"filetime":"1231123233"},"_request_id":"23.0.0","_valid_as_of"
:1231611885,"error_status":403,"error_string":"Permission
denied","reference":"http:\/\/
bennbrian.pbwiki.com\/api_v2\/
#PutFile","success":0}
*/
* Closing connection #0