django-encrypted-filefield icon indicating copy to clipboard operation
django-encrypted-filefield copied to clipboard

Larger files support

Open ajutzeler opened this issue 5 years ago • 3 comments

Hi @danielquinn

It is my understanding that we can only save files with EncryptedFileField whose content fits in memory and that this limitation comes from your Cryptographer being based on pyca/cryptography's Fernet.

Is there any plan to support larger files and supports chunked files and moving existing FS files like Django's FileField does?

I imagine that it would be possible by going into pyca/cryptography's "Hazardous Layer".

Thank you very much.

ajutzeler avatar May 21 '19 07:05 ajutzeler

That's definitely a limitation with the current implementation. However the time I have available for work on this library is limited, so it's not something I'm going to do in the near future. However, I'm always happy to field pull requests for something like this -- just please make sure you submit patches with tests :-)

danielquinn avatar May 21 '19 09:05 danielquinn

Thank you for your prompt reply.

I am going to discuss the issue within my company and if we decide to carry on by implementing it, I'll send you a PR for sure.

ajutzeler avatar May 21 '19 09:05 ajutzeler

Cool beans! If it helps at all, here's some code I wrote for another project for use in hashing large files. I don't know if the methodology would be the same, but it may be worth a look.

danielquinn avatar May 21 '19 09:05 danielquinn