Google Cloud Storage REST API takes too much time when uploading a file

旧巷老猫 提交于 2019-12-10 21:35:32

问题


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).

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?

Thanks a lot!


回答1:


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.




回答2:


Finally I did use the JetS3t java toolkit and the file was uploaded in 5 seconds only.

Hope this helps someone!




回答3:


A new issue was opened in our issue tracker, you can find it here. Feel free to add more information on it, we will try to get into it ASAP.



来源:https://stackoverflow.com/questions/16764115/google-cloud-storage-rest-api-takes-too-much-time-when-uploading-a-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!