質問

I need to obtain path from a FileField, in order to check it against a given file system path, to know if the file I am inserting into mongo database is already present. Is it possible?

All I get is a GridFSProxy, but I am unable to understand how to handle it.

役に立ちましたか?

解決

You can't since it stores the data into database. If you need to store the original path then you can create an EmbeddedDocument which contains a FileField and a StringField with the path string. But remember that the stored file and the file you might find on that path are not the same

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top