def path_prefix(path):
def wrapper(instance, filename):
ext = filename.split('.')[-1]
filename = '{}.{}'.format(uuid4().hex, ext)
return os.path.join(path, filename)
return wrapper
Created
May 13, 2014 11:54
-
-
Save jarvys/9001f012414e3e04c4bf to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment