You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
I have created an app to test your module ,which I called encfiles and I created a model called Document with a FileField called file.
So far I have succesfully encrypted the file as you will see below ,my file has the ".enc" extension.
I am facing a ValidationError when I am trying to decrypt the file.
Here is my tests inside the python shell.
>>> from encfiles.models import *
>>> from djangoencryptfile import EncryptionService, ValidationError
>>> service = EncryptionService()
>>> password = '123'
>>> data = Document.objects.get(pk=1)
>>> myfile = data.file
>>> myfile
<FieldFile: uploaded_files/new_path.txt.enc>
>>> decrypt_file = service.decrypt_file(myfile, password, extension='.enc')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/danai/pki/local/lib/python2.7/site-packages/djangoencryptfile/django_encrypt_file.py", line 123, in decrypt_file
return self._return_or_raise('File does not exist')
File "/home/danai/pki/local/lib/python2.7/site-packages/djangoencryptfile/django_encrypt_file.py", line 149, in _return_or_raise
raise ValidationError(msg)
ValidationError: File does not exist
I have created an app to test your module ,which I called encfiles and I created a model called Document with a FileField called file.
So far I have succesfully encrypted the file as you will see below ,my file has the ".enc" extension.
I am facing a ValidationError when I am trying to decrypt the file.
Here is my tests inside the python shell.