def get_image_path(instance, filename): """ Description: Determine a unique upload path for a given photo image file Arguments: - instance: Photo model instance where file is being attached - filename: filename that was originally given to the file Return: Unique filepath for given file, that's a subpath of `photo/` Author: Nnoduka Eruchalu """ return get_upload_path(instance, filename, 'photo/')
def get_zip_path(instance, filename): """ Description: Determine a unique temporary upload path for a given zip file. Arguments: - instance: Gallery model instance which uses zip file to extract photos - filename: filename that was originally given to the file Return: Unique filepath for given file, that's a subpath of `temp/` Author: Nnoduka Eruchalu """ return get_upload_path(instance, filename, 'temp/')