Google应用引擎 - 限制文件大小上传 [英] Google app engine - limit file size upload
问题描述
1-客户端(这几乎是不可能的,除非使用客户端插件,比如Flash或Applets),所以我放弃了这一个
2-在服务器端,我可以知道文件/图像/视频的大小,然后将其存储在数据库中?
谢谢!
使用简单的 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屋!