I have deployed my django site in vercel(using free hosting plan). Now while I am trying to create a model object (which has image/file field) from admin panel, is not saving. Instead of this it is showing that
OSError at /admin/portfolio/biodata/add/ [Errno 30] Read-only file system: '/var/task/media'
I think media folder is saved in /var/task/media
this directory and this directory doesn't have any permission to write it.
Here is my models.py:
class Biodata(models.Model):
name = models.CharField(max_length=100)
profile_pic = models.ImageField(upload_to='img/profile_pic')
about_me = models.TextField()
cv_file = models.FileField(upload_to='files')
created_at = models.DateTimeField(auto_now_add=True, blank=True, null=True)
....
....
def __str__(self):
return self.name
Now, can anyone tell me that how can I override the permission or solve this issue so that I can upload images or files from admin panel.
Thanks in advance.