0
class videos(models.Model):
    caption = models.CharField(max_length=200,null=True)
    videoes = models.FileField(default='Product.png', null=True, validators=[validators.FileExtensionValidator(allowed_extensions=['mp4','mkv']), validators.MaxLengthValidator(limit_value=(10))])
    created = models.DateTimeField(auto_now_add=True)
mousetail
  • 7,009
  • 4
  • 25
  • 45
  • Does this answer your question? [Getting file size in Python?](https://stackoverflow.com/questions/6591931/getting-file-size-in-python) – Zenek Jul 22 '22 at 09:13
  • Is your intention to limit the maximum size of the uploaded file? Please [edit] your post to clarify – mousetail Jul 22 '22 at 09:14
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 22 '22 at 09:46

0 Answers0