Google应用引擎 - 限制文件大小上传 [英] Google app engine - limit file size upload

查看:574
本文介绍了Google应用引擎 - 限制文件大小上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



1-客户端(这几乎是不可能的,除非使用客户端插件,比如Flash或Applets),所以我放弃了这一个



2-在服务器端,我可以知道文件/图像/视频的大小,然后将其存储在数据库中?

谢谢! Blobstore 服务,目前没有办法限制上传的文件大小(开放问题 here )。

使用简单的 BlobProperty ,你可以检查blob的大小上传后用 len(uploaded_blob)


编辑

现在修正了


I would like to limit the size during a file upload according to the next requirements:

1- Client side ( this is almost impossible unless using client plugins such as Flash or Applets ) so I discard this one

2- On the server side, can I know the size of a file / image / video before storing it in the database?

Thanks!

解决方案

With the Blobstore service, currently there is no way to limit the file size upload (open issue here).
Storing your data using a simple BlobProperty, you could check the size of the blob after the upload with len(uploaded_blob).

EDIT:
this is now fixed

这篇关于Google应用引擎 - 限制文件大小上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆