Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用CURL在Parse中上传文件?_Php_Parsing_Curl - Fatal编程技术网

Php 如何使用CURL在Parse中上传文件?

Php 如何使用CURL在Parse中上传文件?,php,parsing,curl,Php,Parsing,Curl,我有以下资料: curl-X柱\ -H“X-Parse-Application-Id:appid” -H“X-Parse-REST-API-Key:restkey” -H“内容类型:文本/普通” -“你好,世界!” 我回来了: {“url”:http://files.parse.com/7680c0e7-b398-4b43-91f0-61b12934c690/08d828ef-1185-4036-b8ab-228764fbeb69-hello.txt,“名称”:“08d828ef-1185-4

我有以下资料:

curl-X柱\ -H“X-Parse-Application-Id:appid” -H“X-Parse-REST-API-Key:restkey” -H“内容类型:文本/普通” -“你好,世界!”

我回来了:

{“url”:http://files.parse.com/7680c0e7-b398-4b43-91f0-61b12934c690/08d828ef-1185-4036-b8ab-228764fbeb69-hello.txt,“名称”:“08d828ef-1185-4036-b8ab-228764fbeb69-hello.txt”}


我应该使用的文件名是什么?

返回的URL-您可以在之后获取所有内容

这包括以下几点:

curl-X柱\ -H“X-Parse-Application-Id:appid”\ -H“X-Parse-REST-API-Key:reskey”\ -H“内容类型:应用程序/json”\ -d'{ “名称”:“blisdco”, “图片”:{ “名称”:“7680c0e7-b398-4b43-91f0-61b12934c690/08d828ef-1185-4036-b8ab-228764fbeb69-hello.txt”, “类型”:“文件” } }' \

返回的是:

{“createdAt”:“2012-06-12T20:16:05.360Z”,“objectId”:“yHLhqMgBAj”}

如果您在Parse Data Browser中查看CustomerImage表,您将看到条目-包括URL的文件名部分