简体   繁体   中英

Upload files to DEFAULT_FILE_STORAGE instead of GridFs with mongoengine

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 custom filefield out there, that behaves like the regular django FileField?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM