def get_file_size(fp):
    """
    Get the file size for a file-like object

    :param fp: file-like object
    :return:
    """
    original_file_position = fp.tell()
    fp.seek(0, os.SEEK_END)
    file_len = fp.tell()
    fp.seek(original_file_position, os.SEEK_SET)
    return file_len

    Get the file size for a file-like object

    :param fp: file-like object
    :return:
    
instagram_private_api/utils.py