neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
863 stars 153 forks source link

Fix _size problem for latest Django #129

Closed lqez closed 6 years ago

lqez commented 6 years ago

_size should not be used for getting the file size. Or we get AttributeError: 'InMemoryUploadedFile' object has no attribute '_size' error with latest Django. XRef: https://github.com/django/django/pull/9769/files

timgraham commented 6 years ago

Why use len() instead of .size? Can you add regression tests?

lqez commented 6 years ago

@timgraham I misunderstood the previous code. I'll add a test for it. Thanks.

lqez commented 6 years ago

The build error occurred on Docker/Travis side. https://travis-ci.org/neutronX/django-markdownx/jobs/434021654

lqez commented 6 years ago

@timgraham Thanks for your review. I updated PR.