Fixed generate filename bug
This commit is contained in:
parent
d335be47c9
commit
79c190d25e
|
@ -6,7 +6,7 @@ def filer_generate_randomized(instance, filename):
|
|||
uuid_str = u'{}'.format(uuid.uuid4())
|
||||
random_path = u"%s/%s/%s" % (uuid_str[0:2], uuid_str[2:4], uuid_str)
|
||||
name, extension = os.path.splitext(filename)
|
||||
filename = u'{}{}'.format(
|
||||
filename = u'{}.{}'.format(
|
||||
uuid.uuid4(), extension
|
||||
)
|
||||
return os.path.join(random_path, filename)
|
||||
|
|
Reference in New Issue