Change name of uploaded file at a later point in time - django -


is possible change name of file after has been uploaded. , change has done not @ time when file being uploaded @ later stage. in different function process file , have change name of file. seems can't change name of file, unlike other attributes of object.

any appreciated.

can find this: ?

class baseimage(models.model):     """         base image model     """      path_format_str = u'%(id_prefix)s/gallery-%(object_id)s/%(image_name)s'      def upload_to(self, original_name):          return self.path_format_str % {             'id_prefix': str(self.object_id).zfill(6)[:3],             'object_id': self.object_id,             'image_name': sanitize_file_name(original_name),         }      file_data = models.imagefield(         blank=true,         upload_to=upload_to,         verbose_name=u'soubor s obrázkem',         help_text=mark_safe(u'připojte fotku - formát jpg, bla bla bla ,...'),         max_length=255     ) 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -