Upload files to DEFAULT_FILE_STORAGE instead of GridFs with mongoengine

后端 未结 1 1387
野性不改
野性不改 2021-01-15 21:05

I want to be able to store files in amazon s3. The FileField in mongoengine seems to be hardcoded with gridfs.

What can I do to achieve this?

Is there a cust

相关标签:
1条回答
  • 2021-01-15 21:22

    I havent seen an S3 FileField for use with MongoEngine - so currently, you'd have to roll your own implementation - you could use a StringField to store the location or you could create your own proxy_class like ImageField but it is quite tided to GridFs but I'm happy to abstract that away if needed.

    As always pull requests welcome! https://github.com/MongoEngine/mongoengine

    0 讨论(0)
提交回复
热议问题