使用 Django 的管理界面将大文件上传到 GAE
我一直在尝试找到一种使用 Django 管理界面将大文件上传到 GAE 数据存储的方法,但尚未找到专门解决此问题的答案。我对 Python/Django 相当陌生,所以可能有一个我没有关注的角度。
我一直在查看 django-filetransfers 解决方案,但我不确定如何将其集成到管理界面中。任何建议都会很棒!
I've been trying to find a way to upload a large file to GAE's datastore using Django's admin interface, but haven't found an answer that specifically addresses this issue. I'm fairly new to Python/Django, so there might be an angle that I'm not looking at.
I've been looking at the django-filetransfers solution, but I'm not sure how to integrate that into the admin interface. Any suggestions would be great!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文件上传到 appengine 是使用 blobstore 而不是数据存储来处理的。
https://developers.google.com/appengine/docs/python/blobstore /overview#Complete_Sample_App
数据存储文件大小限制为 1 MB。因此,尝试将大文件上传到应用程序引擎的非关系数据库中是行不通的。这是设计使然。
我上面提供的文档向您展示了如何实现大文件上传。
File uploads to the appengine are handled using the blobstore and not the datastore.
https://developers.google.com/appengine/docs/python/blobstore/overview#Complete_Sample_App
The datastore filesize limit is 1 megabyte. So, attempting to upload a large file into the appengine's non-relational database isn't going to work. This is by design.
The documentation I provided above shows you how to implement large file uploads.