diff --git a/.gitignore b/.gitignore index 5485507a52adc3c6ccb46f76e14087e42860cb86..4d43f387e85330c273f8f85b730634253f3f74e7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ __pycache__ .python-version - +/uploads* /media* SCIPOST_JOURNALS diff --git a/comments/models.py b/comments/models.py index f068f9dc87f23b3b36f5aacf610b280185066616..3e09732a2273c476b51be2bd07ed4a34d611a6c7 100644 --- a/comments/models.py +++ b/comments/models.py @@ -40,7 +40,7 @@ class Comment(TimeStampedModel): vetted_by = models.ForeignKey(Contributor, blank=True, null=True, on_delete=models.CASCADE, related_name='comment_vetted_by') - file_attachment = models.FileField(upload_to='comments/%Y/%m/%d/', blank=True, + file_attachment = models.FileField(upload_to='uploads/comments/%Y/%m/%d/', blank=True, validators=[validate_file_extension, validate_max_file_size]) # a Comment is either for a Commentary or Submission or a ThesisLink.