Closed atodorov closed 6 years ago
@bartTC ping. Please give me a general review on this PR before I spend more time on it writing tests.
@atodorov I think thiis fine and a good approach, thanks for tackling this.
@bartTC rebased and ready to go. Can you release a new version on PyPI after you merge this. I really need the max file size and delete functionality for Kiwi TCMS.
Sure, its here https://pypi.python.org/pypi/django-attachments
Thank you for your comprehensive updates.
This PR implements max file size validation.
@bartTC in case of error I'm seeing the following message "File exceeds maximum size of 1.2В MB"
Notice the "B" char after "1.2". I'm not sure where this comes from, I think it is from
form.as_p
.filesizeformat
in this case happily returns "1.2 MB".Note2: I don't have any tests and also not sure if it will work on older Django but works for me locally.