import random
import string


def generate_id(size=6):
    """Generate a random ID, hopefully unique to be used as a unique identifier
    for each uploaded file.

    Args:
        size (int): Number of characters to generate
    
    Returns:
        str: The random ID
    """
    return ''.join(
        random.SystemRandom().choice(string.ascii_letters) for _ in range(size)
    )