我想使用api将本地文件上传到mirrorace.com,并且正在使用Curl。
我正在使用此代码
curl $SERVER -X POST -F api_key=$my_api_key -F api_token=$my_api_token -F upload_key=$my_upload_key -F cTracker=$my_cTracker $mirrors -F files=@$2GBFILE.EXT
但回应是
<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
我试图 -H“内容长度:字节0-99999995 / $ TOTAL_FILE_SIZE” 和“内容长度” 标志,但响应始终相同。
All Upload requests shall be multipart/form-data encoded.
MirrorAce only supports chunk upload for files larger than Maximum chuck size. A single request should not upload more than Maximum chuck size. Note: Maximum chuck size will be returned from file/upload method.
Maximum chuck size as of now is 99999995 Bytes.
For files larger then the Maximum chuck size, files should be sent in chunks with proper "Content-Length" and "Content-Range" headers.
Every parameter should be sent with every chunk.
您可以检查其API文档。此处:https://mirrorace.com/api 有一个官方样本,但对我再也没有用 mirrorace_upload_example.php (Github)