问题描述
我尝试通过Google云端存储REST API上传文件。它工作正常,但任务需要太多的时间,我想。我做的最后一个测试是上传一张171KB大小的图片,任务工作71秒。 (我的上传连接能够上传251KB / s,通过在线速度测试)。
I'm trying to upload a file through Google Cloud Storage REST API. It works fine, but the task takes too much time, I think. The last test I did was uploading a 171KB sized picture, and the task was working for 71 seconds. (my upload connection is able to upload 251KB/s, by an online speed test).
我执行的代码几乎等于。我修改的唯一的东西是mediaContent上传(而不是RandomDataBlockInputStream,我试图上传一个FileInputStream与图片)。
The code I am executing is almost equal as the one placed in storage-cmdline-sample. The only thing I modified was the mediaContent to upload (instead the RandomDataBlockInputStream, I'm trying to upload a FileInputStream with the picture).
我不知道是否正常,但看起来不像。可能是我做错了什么?
I don't know if it's normal, but doesn't look like that. What could be the thing am I doing wrong?
非常感谢。
推荐答案
您可以更改日志级别(更多详细信息)并附加日志输出?看起来很奇怪,它不应该需要71秒来上传一个171KB的文件。
Can you please change the log level (more details here) and attach the log output? It seems weird, it shouldn't take about 71 seconds to upload a 171KB file.
这篇关于Google云端存储REST API上传文件需要花费太多时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!