سؤال

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