Skip to content

Instantly share code, notes, and snippets.

@sergeybe
Last active October 13, 2017 10:54
Show Gist options
  • Save sergeybe/685aedfaabfd9cdd3176 to your computer and use it in GitHub Desktop.
Save sergeybe/685aedfaabfd9cdd3176 to your computer and use it in GitHub Desktop.
Path for image upload
from stdimage.utils import UploadToUUID
class UploadTo(UploadToUUID):
"""
Creates path file like `path/abc/abcdefabcdefabcdefabcdefabcdefab.ext`
"""
path_pattern = os.path.join('%(path)s', '%(name).3s')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment