与对象Parse.com关联

时间:2014-08-16 00:15:00

标签: parse-platform

我试图将图像与用户关联起来,如下所示:

curl -X POST \
>   -H "X-Parse-Application-Id: UhTgAxD9LJ6nwVTrxcRVoE6Oja9lhbe6e3UBngHF" \
>   -H "X-Parse-REST-API-Key: 7ZAymw2hoXmv3d2WyRNRmGWFx8fVDNu2zU4Kf5aH" \
>   -H "Content-Type: application/json" \
>   -d '{"username":"fjfkd","password":"dkdk","email":"dennisgec@mce.com","profilePicture":{"name":"tfss-eb91302d-c703-45d2-8dbd-5f209ea90c31-pic.jpg","__type":"File"}}' \
>   https://api.parse.com/1/users

我得到了这么长的回应:

{
code = 142;
error = "{\"uuid\":\"1f9c8ac9-a871-539b-f919-2be052e3ac55\",\"status\":503,\"headers\":{\"Connection\":\"keep-alive\",\"Content-Language\":\"en\",\"Content-Length\":\"3558\",\"Content-Type\":\"text/html\",\"Date\":\"Sat, 16 Aug 2014 00:01:56 GMT\",\"Mime-Version\":\"1.0\",\"Server\":\"squid/3.1.19\",\"Vary\":\"Accept-Language\",\"Via\":\"1.0 localhost (squid/3.1.19)\",\"X-Cache\":\"MISS from localhost\",\"X-Cache-Lookup\":\"MISS from localhost:3128\",\"X-Squid-Error\":\"ERR_DNS_FAIL 0\"},\"text\":\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\" \\\"http://www.w3.org/TR/html4/strict.dtd\\\">\\n<html><head>\\n<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\\n<title>ERROR: The requested URL could not be retrieved

有关此问题的任何帮助吗?

1 个答案:

答案 0 :(得分:0)

在构建与文件类型的关系时,您需要以下元素(u left out url)。

名称

URL

示例:

"media2":{"__type":"File","name":"..-27dc3f482443-picf1","url":"http://files.parse.com/...-ab85-27dc3f482443-picf1"},
相关问题