简体   繁体   English

Google App Engine Blobstore上传网址过期

[英]Google app engine blobstore upload url expire

I am trying to have a webpage with a file upload box. 我正在尝试一个带有文件上传框的网页。 However, the default type of uploading url will expire in about 10 minutes. 但是,默认的上传网址类型将在大约10分钟后过期。 I am thinking of ways to prevent that. 我正在考虑防止这种情况的方法。

Stop Blob URL from expiring https://groups.google.com/forum/#!topic/jquery-fileupload/W6-8rJXgq50 阻止Blob URL过期 https://groups.google.com/forum/#!topic/jquery-fileupload/W6-8rJXgq50

This two suggests a way of using jquery to fetch the url when the user adds the file. 这两个建议了一种在用户添加文件时使用jquery来获取url的方法。 The first url, the user uses java and i use python. 第一个网址,用户使用java,而我使用python。 Also, it only mentions about JQuery side whereas on the python side i do not know what to write to achieve this. 另外,它只提到了JQuery方面,而在python方面我不知道该怎么写。

Is there anyone who could give me some insights on how to do this in both the html and the python. 有谁可以给​​我一些有关如何在html和python中执行此操作的见解。

Build your form as you normally would, and your backend code as you normally would. 像往常一样构建表单,并像往常一样构建后端代码。 At this stage the fact that the URL expires is irrelevant. 在此阶段,URL过期是无关紧要的。

Once your form is working and your backend can accept the data without issue, then use javascript to get a fresh url as the form is submitted. 表单正常工作后,后端可以毫无问题地接受数据,然后在提交表单时使用javascript获取新的网址。 The method is described in this answer . 此答案中描述了该方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM