Answers.Body: <p>It looks like you're trying to access another asset within your assets (asset meta field).</p>
  
  <pre><code>{% 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 %}
  </code></pre>
  
  <p>I guess that's not what you want. Check your field handles again, you probably only need to do this.</p>
  
  <pre><code>{% set photos = entry.photos %}
  
  {% for photo in photos %}
      {{ photo.getUrl() }}
  {% endfor %}
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>{% set photos = entry.photos.source('uploadPhoto') %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T09:05:36.980Z
Answers.LastActivityDate: 2015-03-25T09:38:39.970Z
Answers.LastEditDate: 2015-03-25T09:38:39.970Z
Answers.UserDisplayName: carlcs
Body: <p>Please refer <a href="https://craftcms.stackexchange.com/questions/8821/multiple-photos-assets-in-one-upload-entry/8837#8837">to this thread</a> for information leading up to this problem.</p>
  
  <p>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.</p>
  
  <p>Here is my code: </p>
  
  <pre><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 %}
  </code></pre>
  
  <p>Any help with rectifying this code would be absolutely wholeheartedly appreciated!</p>
  
  <p>Thank you!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-25T08:42:32.343Z
Comments.Text: Is ```entry.photos``` a Matrix field or an Assets field?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-25T08:53:41.953Z
Comments.Text: An assets field @MatsMikkelRummelhoff
Comments.UserDisplayName: Harkat
Tags: <assets><upload>
Title: Uploaded photos not showing on entry
ThreadText: # Uploaded photos not showing on entry
  
  (Asked by: username_0 on 2015-03-25)
  
  Please refer [to this thread](https://craftcms.stackexchange.com/questions/8821/multiple-photos-assets-in-one-upload-entry/8837#8837) 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 %}
                <div class="container">
                      <div class="page-title-heading">
                          <h1>{{ entry.title }}</h1>
                      </div>
                  </div>
                  <div class="title-border"></div>
  
          <div class="portfolio-container">
          {{ entry.body }}
  
          <ul id="portfolio-items-one-fourth" class="portfolio-items-one-fourth clearfix">
              {% set photos = entry.photos %}
              {% if photos | length %}
              {% for photo in photos %}
              <li class="item photo" style="display: inline-block; opacity: 1;">
                  <div class="item-content">
                      <div class="link-holder">
                          <div class="portfolio-item-holder">
                              <div class="portfolio-item-hover-content">
                                  {% set image = photo.uploadPhoto.first() %}
                                  <a href="{{ image.getUrl('photoLightbox') }}" class="fancybox" rel="gallery" title="{{ photo.photoCaption }}">
                                      <img src="{{ image.getUrl('photoListing') }}" width="270" class="portfolio-img">
                                  </a>
                              </div>
                          </div>
                      </div>
                  </div>
              </li>
              {% endfor %}
              {% endif %}
          </ul>
      </div>
  
      <p class="next-prev gallery-links">
          {% set prev = entry.getPrev({'section' : entry.section.handle}) %}
          {% set next = entry.getNext({'section' : entry.section.handle}) %}
          {% if prev %}<a href="{{ prev.url }}">&laquo; {{ prev }}</a>{% endif %}
          {% if next %}<a href="{{ next.url }}">{{ next }} &raquo;</a>{% endif %}
      </p>
      <p class="photo-credits gallery-links">
          <a href="/photo-credits">Photographer credits</a>.
      </p>
  
      {% endblock %}
  
  ```
  
  Any help with rectifying this code would be absolutely wholeheartedly appreciated!
  
  Thank you!
  
  **Tags:** assets, upload
  
  > **Comments:**
  > **username_1**: Is ```entry.photos``` a Matrix field or an Assets field?  
  > **username_0**: An assets field @username_1  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-03-25. Score: 3
  
  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') %}
  
  ```
  
  
  ---
  
  