Uploaded photos not showing on entry Please refer to this thread for information leading up to this problem.

I am having problems with mass file uploads, the files will upload in my CP for craft, and be present on the assets list, however when I come to post the entry, only one image will show on my live page.

Here is my code: 

{% extends "_layout/_layout" %}

{% set bodyClass = "photos" %}

{% block metaTitle %}{{ entry.title }} Photo Gallery{% endblock %}
{% block metaDescription %}{{ entry.metaDescription }}{% endblock %}

    {% block content %}
              &lt;div class="container"&gt;
                    &lt;div class="page-title-heading"&gt;
                        &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="title-border"&gt;&lt;/div&gt;

        &lt;div class="portfolio-container"&gt;
        {{ entry.body }}

        &lt;ul id="portfolio-items-one-fourth" class="portfolio-items-one-fourth clearfix"&gt;
            {% set photos = entry.photos %}
            {% if photos | length %}
            {% for photo in photos %}
            &lt;li class="item photo" style="display: inline-block; opacity: 1;"&gt;
                &lt;div class="item-content"&gt;
                    &lt;div class="link-holder"&gt;
                        &lt;div class="portfolio-item-holder"&gt;
                            &lt;div class="portfolio-item-hover-content"&gt;
                                {% set image = photo.uploadPhoto.first() %}
                                &lt;a href="{{ image.getUrl('photoLightbox') }}" class="fancybox" rel="gallery" title="{{ photo.photoCaption }}"&gt;
                                    &lt;img src="{{ image.getUrl('photoListing') }}" width="270" class="portfolio-img"&gt;
                                &lt;/a&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/li&gt;
            {% endfor %}
            {% endif %}
        &lt;/ul&gt;
    &lt;/div&gt;

    &lt;p class="next-prev gallery-links"&gt;
        {% set prev = entry.getPrev({'section' : entry.section.handle}) %}
        {% set next = entry.getNext({'section' : entry.section.handle}) %}
        {% if prev %}&lt;a href="{{ prev.url }}"&gt;&amp;laquo; {{ prev }}&lt;/a&gt;{% endif %}
        {% if next %}&lt;a href="{{ next.url }}"&gt;{{ next }} &amp;raquo;&lt;/a&gt;{% endif %}
    &lt;/p&gt;
    &lt;p class="photo-credits gallery-links"&gt;
        &lt;a href="/photo-credits"&gt;Photographer credits&lt;/a&gt;.
    &lt;/p&gt;

    {% endblock %}


Any help with rectifying this code would be absolutely wholeheartedly appreciated!

Thank you!
It looks like you're trying to access another asset within your assets (asset meta field).

{% set photos = entry.photos %}

{# Loop assets of `entry.photos` as `photo` #}
{% for photo in photos %}

    {# Get first `uploadPhoto` element within `entry.photos[nth]` #}
    {% set image = photo.uploadPhoto.first() %}
    {{ image.getUrl() }}

{% endfor %}


I guess that's not what you want. Check your field handles again, you probably only need to do this.

{% set photos = entry.photos %}

{% for photo in photos %}
    {{ photo.getUrl() }}
{% endfor %}


If 'uploadPhoto' is an asset source and you allow users to upload to multiple sources, but only want to loop assets from 'uploadPhoto' in your template, you would do this like so.

{% set photos = entry.photos.source('uploadPhoto') %}