GridFS(MongoDB)的自定义存储系统? [英] Custom storage system for GridFS (MongoDB)?

查看:159
本文介绍了GridFS(MongoDB)的自定义存储系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以指向任何提供可插拔自定义存储系统的项目/ django应用程序,以便我可以使用GridFS与Django来存储文件上传?



发现django-mongodb,但它似乎不支持GridFS,也不支持django-storage。



我打算为正常的数据库需求运行mysql,只能使用mongodb进行文件存储所以要清楚,我不想使用mongodb作为我的主数据库。

解决方案

我在PyMongo,MongoDB Python驱动程序,并没有听说过使用GridFS为Django提供定制存储的任何项目。这看起来很难在PyMongo之上写下来:可能是直接翻译 GridFS API Django存储API 。也许可以看看在某些时候一起扔东西,但这对于任何想要参与的人来说都是一个很好的开源项目。


Can anyone point me to any projects/django apps that provide a plugable custom storage system so I can use GridFS with Django to store file uploads?

I've found django-mongodb but it doesnt seem to support GridFS, nor does django-storages.

I plan to run mysql for the normal database requrements and only use mongodb for file storage so to be clear I dont want to use mongodb as my main database.

解决方案

I work on PyMongo, the MongoDB Python driver, and haven't heard of any project to provide custom storage for Django using GridFS. This looks like it wouldn't be very hard to write on top of PyMongo: could probably be a direct translation of the GridFS API onto the Django storage API. Maybe could take a look at throwing something together at some point, but this would be a great open-source project for anybody looking to get involved.

这篇关于GridFS(MongoDB)的自定义存储系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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