diff --git a/articles/models.py b/articles/models.py index 94ea88d..4d201da 100644 --- a/articles/models.py +++ b/articles/models.py @@ -513,7 +513,7 @@ def filename(self): @property def content_type_class(self): - mt = mimetypes.guess_type(self.attachment.path)[0] + mt = mimetypes.guess_type(self.uploadedfile.url)[0] if mt: content_type = mt.replace('/', '_') else: