Example #1
0
def get_mp3_path(instance, filename):
    """
    Description: Determine a unique upload path for a given Song mp3 file
    
    Arguments:   - instance: Song 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 `audio/`
            
    Author:      Nnoduka Eruchalu
    """
    return get_upload_path(instance, filename, 'audio/')
Example #2
0
def get_albumart_path(instance, filename):
    """
    Description: Determine a unique upload path for a given Album art file
    
    Arguments:   - instance: Album 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 `img/art/`
            
    Author:      Nnoduka Eruchalu
    """
    return get_upload_path(instance, filename, 'img/art/')
Example #3
0
def get_mp3_path(instance, filename):
    """
    Description: Determine a unique upload path for a given Song mp3 file
    
    Arguments:   - instance: Song 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 `audio/`
            
    Author:      Nnoduka Eruchalu
    """
    return get_upload_path(instance, filename, 'audio/')
Example #4
0
def get_albumart_path(instance, filename):
    """
    Description: Determine a unique upload path for a given Album art file
    
    Arguments:   - instance: Album 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 `img/art/`
            
    Author:      Nnoduka Eruchalu
    """
    return get_upload_path(instance, filename, 'img/art/')
Example #5
0
def get_cover_path(instance, filename):
    return get_upload_path(instance, filename, 'img/c/')
Example #6
0
def get_avatar_path(instance, filename):
    return get_upload_path(instance, filename, 'img/a/')
Example #7
0
def get_cover_path(instance, filename):
    return get_upload_path(instance, filename, 'img/c/')
Example #8
0
def get_avatar_path(instance, filename):
    return get_upload_path(instance, filename, 'img/a/')