def save(self, *args, **kwargs):
    path_of_file = self.myimg.name
self.myimg.name = path_of_file.upper()
super(MyModel, self).save()
Optimize Django model save method for accessing to uploaded file path