diff --git a/backend/examples/models.py b/backend/examples/models.py index ea18ea25..947a300e 100644 --- a/backend/examples/models.py +++ b/backend/examples/models.py @@ -2,6 +2,7 @@ import uuid from django.contrib.auth.models import User from django.db import models +from django_drf_filepond.models import DrfFilePondStoredStorage from .managers import ExampleManager, ExampleStateManager from projects.models import Project @@ -12,7 +13,7 @@ class Example(models.Model): uuid = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True, unique=True) meta = models.JSONField(default=dict) - filename = models.FileField(default=".", max_length=1024) + filename = models.FileField(default=".", max_length=1024, storage=DrfFilePondStoredStorage()) project = models.ForeignKey(to=Project, on_delete=models.CASCADE, related_name="examples") annotations_approved_by = models.ForeignKey(to=User, on_delete=models.SET_NULL, null=True, blank=True) text = models.TextField(null=True, blank=True)