2017-07-05 34 views
0

我正在与ShareMy3D API并遇到了一个问题。把二进制数据python sharemy3d

我有一个文件上传链接,需要执行

curl -X PUT -T - "[UPLOAD_URL]" < PATH_TO_LOCAL_FILE 

我的具体curl命令:

curl -X PUT -T - https://storage.googleapis.com/sharemy3d-central-us-1-produc‌​tion/alotofstuff < /home/max/Documents/file.obj 

后我执行它,我总是得到:

curl: (6) Could not resolve host: < 
curl: (3) <url> malformed 

是否有其他方法可以PUT 二进制文件?

+1

请您可以显示您正在使用的特定CURL命令,该代码不起作用。 (如果您愿意,可以将任何网址更改为“example.com”。) – DaveP

+0

您好,@DaveP。它是'curl -X PUT -T - https://storage.googleapis.com/sharemy3d-central-us-1-production/alotofstuff

回答

0

我所要做的只是执行curl -T file.obj https://example.com
With -T(与--upload-file相同)curl将使用PUT代替HTTP