def pre_save(self, obj):
    obj.samplesheet = self.request.FILES.get('file')


class Experiment(Model):
    notes = TextField(blank=True)
samplesheet = FileField(blank=True, default='')
user = ForeignKey(User, related_name='experiments')


class ExperimentSerializer(ModelSerializer):


    class Meta:
        model = Experiment
Django Rest Framework File Upload