'This is called whenever self.file changes (including initial set in __init__).
MultiStorageFileField has a custom descriptor which calls this function when
field value is changed.
Returns True if data related attributes were updated, False otherwise.'

def file_data_changed(self, post_init=False):

    if (self._file_data_changed_hint is not None):
        data_changed_hint = self._file_data_changed_hint
        self._file_data_changed_hint = None
        if (not data_changed_hint):
            return False
    if (post_init and self._file_size and self.sha1):
        return False
    try:
        self._file_size = self.file.size
    except:
        self._file_size = None
    try:
        self.generate_sha1()
    except Exception:
        self.sha1 = u''
    return True
