Media file is not saving

Hello experts,

I am trying to upload media (Image file) to the server. The entry is being created in the table but actual media file is not getting saved in the media folder.

class File(models.Model):

file = models.FileField(blank=False, null=False)

    file = models.ImageField(upload_to='media/', blank=True)
    remark = models.CharField(max_length=20)
    timestamp = models.DateTimeField(auto_now_add=True)

path(‘upload/’, views.FileView.as_view(), name=‘file-upload’),
class FileSerializer(serializers.ModelSerializer):
class Meta:
model = File

class FileView(generics.ListCreateAPIView):
queryset = File.objects.all()
serializer_class = FileSerializer

Global setting:

if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Output is generated as below:

"id": 18,
    "file": "https://<URL>/media/home/tguser/tgportal/core/media/check.png",
    "remark": "ok",
    "timestamp": "2021-03-19T16:43:50.131435Z"

However, in media file is not getting saved.

Any help would be appreciated.