class Project(models.Model):
    video = models.FileField(upload_to='media')

def replace_video(self):
    """Convert video to WebM format."""
video_path = convert_video()
old_path = self.video.path
self.video.save(os.path.basename(video_path), File(open(video_path, 'wb')),
    save=True)
os.remove(video_path)
os.remove(old_path)
Django: How to replace/overwrite/update/change a file of FileField?