使用数据存储和 30 秒响应时间限制在 Google App Engine 上上传文件

发布于 2024-08-23 05:21:16 字数 169 浏览 2 评论 0原文

谷歌应用程序引擎上的响应计时器会在提交网页表单时启动吗?

如果我要上传大于 1MB 的文件,我可以将文件拆分为 1MB,以适应 Google App Engine 数据存储区的限制。现在,我担心的是,如果客户端的互联网连接速度很慢,它会耗尽 30 秒计时器吗?如果是这样的话,连接慢的话就无法上传大文件了吗?

Will the response timer on google app engine start upon submitting the web page's form?

If I'm going to upload a file that is greater than 1MB, I could split the files to 1MB to fit in the limitation of the Google App Engine Datastore. Now, my concern is if the client's internet connection is slow, it would eat up the 30 seconds timer right? If this is the case, it is impossible to upload large files with slow connection?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

有深☉意 2024-08-30 05:21:16

30 秒响应时间限制仅适用于代码执行。因此,实际文件作为请求正文的一部分的上传被排除在外。仅当客户端将请求完全发送到服务器并且您的代码开始处理提交的请求时,计时器才会启动。因此,客户端的连接速度有多慢并不重要。

The 30 second response time limit only applies to code execution. So the uploading of the actual file as part of the request body is excluded from that. The timer will only start once the request is fully sent to the server by the client, and your code starts handling the submitted request. Hence it doesn't matter how slow your client's connection is.

人│生佛魔见 2024-08-30 05:21:16

附带说明一下,不要将文件拆分为多个部分,而是尝试使用 blobstore。我将它用于图像,它将存储限制提高到 50MB。 (请记住启用计费才能访问 blobstore)

As an side note, Instead of splitting your file into multiple parts, try using the blobstore. I am using it for images and it raises the storage limit to 50MB. (Remember to enable billing to get access to the blobstore)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文