Pergunta

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.

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top