encode unicode objects
This commit is contained in:
parent
d58c1c88e2
commit
fae68f7d35
1 changed files with 2 additions and 1 deletions
|
|
@ -397,5 +397,6 @@ def get_random_filename(extn=None, content_type=None):
|
|||
|
||||
@frappe.whitelist()
|
||||
def validate_filename(filename):
|
||||
fname = get_file_name(filename, hashlib.md5(filename).hexdigest()[-6:])
|
||||
hash_ = get_content_hash(filename)
|
||||
fname = get_file_name(filename, hash_[-6:])
|
||||
return fname
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue