def get_existing_bitstreams(existing_item):
    """
    Retrieve metadata for bitstreams already in DSpace for a given item
    :param existing_item: DSpaceRestClient Item object
    :return: dict of bitstream json with the filename as the key
    """
    bitstream_dict = {}
    existing_bitstreams = existing_item.get_bitstreams()
    if existing_bitstreams is not None and len(existing_bitstreams) > 0:
        for existing_bitstream_json in existing_bitstreams:
            if 'name' in existing_bitstream_json:
                bitstream_name = existing_bitstream_json['name']
                bitstream_dict[bitstream_name] = existing_bitstream_json
    return bitstream_dict