I'm developing a django 1.4 application, and I'm using django-filepicker to upload images. They use a special modelField for images called FPFileField.

I'm interested in storing those images in a MongoDB database, instead of uploading it to a "media" folder or something similar.

Any idea how this can be achieved?

I've tried mongoengine with no luck.

有帮助吗?

解决方案

I would recommend storing the url into your mongo Document directly and then making use of the filepicker.io URL and built in S3 support rather than storing the file on your servers directly.

其他提示

You should look into GridFS

I'd also consider uploading it to amazon's S3 service too - depending on what your requirements are.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top