문제

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