In the case of a general file field, the url starts with http:// in local and https:// in dev and prod. But for privateFileField it starts with http:// everywhere.
Model Code
class ProjectImage(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name="project_image")
image = PrivateFileField(
_("Project Image"),
upload_to=investment_project_image_path,
)
Serializer Code
class ProjectImageSerializer(serializers.ModelSerializer):
class Meta:
model = models.ProjectImage
fields = ['image']
Result

For General File field

Why is this happening?
In the case of a general file field, the url starts with http:// in local and https:// in dev and prod. But for privateFileField it starts with http:// everywhere.
Model Code
Serializer Code
Result

For General File field

Why is this happening?