<p>This is happening because currently it’s not possible for Assets fields to resolve those dynamic subfolder paths until the element the field is associated with has been saved (in this case, your Matrix block).</p>

<p>If you create a new block, click the “Save and continue editing” button (or Command/Ctrl + S), then you should be able to see all of the existing images within the dynamic subfolder.</p>

<p><strong>Update</strong></p>

<p>As of <a href="http://buildwithcraft.com/updates#build2697" rel="nofollow">Craft 2.4.2697</a>, Craft now does attempt to resolve dynamic subfolder paths. If there’s nothing that <em>requires</em> that the element already be saved (e.g. <code>{id}</code>), it will go ahead and use the resolved path rather than the temp folder.</p>

CC BY-SA 3.0
2015-10-08T22:13:34.073Z
I do save it first. The directories never match up. If I add files via the Assets at the top of the Control Panel, the files there never show up in the Matrix Block Asset Field (even after I have saved). If I upload a new file via the Matrix block, the new files don't show up in the Asset Directory listing. The directories never match up -- even though on my file system - the files are there.
Sandy D.
CC BY-SA 3.0
2015-10-14T15:04:25.690Z
@BrandonKelly will the asset fields be able to resolve those paths anytime soon? Clients think this is a bug and I'd say it actually is. If you have a required image field and the client can't select an image from previously uploaded assets then that image select field doesn't really work. I guess I could create a twig function that looks at the URI or anything available to determine what the owning entry is to get owner.slug without having saved yet. It would be nice if it just worked out of the box though.
Justin
CC BY-SA 3.0
2015-10-15T20:04:16.390Z
@Justin Had another look at the code and thought of a good way to solve this, at least some/most of the time. The change has been included in today’s [2.4.2697](http://buildwithcraft.com/updates#build2697) release :)
Brandon Kelly
CC BY-SA 3.0
2015-10-08T20:59:21.227Z
2015-10-15T20:05:54.303Z
2015-10-15T20:05:54.303Z
Brandon Kelly
<p>Okay. So, my problem was that I had multiple Asset Sources since I was trying to give my groups permissions to specific sub-directories. This was causing indexing issues which is why I wasn't seeing the images show up.</p>

<p>CraftCMS has an excellent customer support. They were able to create a plugin that allowed me give my groups permissions to their subdirectories.</p>

<p><strong>Link to plugin</strong>: <a href="https://github.com/pixelandtonic/AssetSubfolderAccess" rel="nofollow">https://github.com/pixelandtonic/AssetSubfolderAccess</a></p>

<p>All you have to do is create your user groups. Then create an asset source configuration that points to your root folder that will contain the subdirectories. Give your user groups permission to the Asset Source (Root folder).</p>

<p>Then on the plugin page after you have installed the plugin. Click on the plugin to go to its settings. This is where you can configure each of your user groups to only have access to their sub-folder. =)</p>

<p>Huge thank you to CraftCMS, Pixel And Tonic, and Brandon for all the help. You guys are amazing!!! =)</p>

CC BY-SA 3.0
2015-10-12T15:04:31.243Z
2015-10-12T15:04:31.243Z
Sandy D.
<p>I have an Asset Source, called <code>files</code>, with two subfolders:</p>

<ul>
<li><code>group1</code></li>
<li><code>group2</code></li>
</ul>

<p>I also have two User Groups, with the same names.</p>

<p>I want everyone in “group1” to save images into files/group1; and I want everyone in “group2” to save images into files/group2.</p>

<p>I have a Matrix field which contains an Assets field. It is configured to:</p>

<ol>
<li>Restrict uploads to a single folder => <strong>files/{owner.author.groups[0].name}/images</strong></li>
<li>Restrict file types to Image</li>
</ol>

<p>When a user from group1 logs in and adds an entry, the image asset folder doesn't display all the data from their images folder.</p>

<p>If I upload images in the Assets folder directly to their images folder and go back to create a new entry, the new image doesn't show up in the image list.</p>

<p>Any ideas what is going on?</p>

CC BY-SA 3.0
2015-10-08T17:41:46.253Z
Please note: all images are being added via the CP. I am not adding any of these files via FTP
Sandy D.
<assets>
Assets Folder: Images don't show up
# Assets Folder: Images don't show up

(Asked by: username_0 on 2015-10-08)

I have an Asset Source, called `files`, with two subfolders:

* `group1`
* `group2`

I also have two User Groups, with the same names.

I want everyone in “group1” to save images into files/group1; and I want everyone in “group2” to save images into files/group2.

I have a Matrix field which contains an Assets field. It is configured to:

1. Restrict uploads to a single folder => **files/{owner.author.groups[0].name}/images**
2. Restrict file types to Image

When a user from group1 logs in and adds an entry, the image asset folder doesn't display all the data from their images folder.

If I upload images in the Assets folder directly to their images folder and go back to create a new entry, the new image doesn't show up in the image list.

Any ideas what is going on?

**Tags:** assets
> **Comments:**
> **username_0**: Please note: all images are being added via the CP. I am not adding any of these files via FTP  

---

## 2 answers

### Answer by username_0 on 2015-10-12. Score: 4 | Accepted answer

Okay. So, my problem was that I had multiple Asset Sources since I was trying to give my groups permissions to specific sub-directories. This was causing indexing issues which is why I wasn't seeing the images show up.

CraftCMS has an excellent customer support. They were able to create a plugin that allowed me give my groups permissions to their subdirectories.

**Link to plugin**: <https://github.com/pixelandtonic/AssetSubfolderAccess>

All you have to do is create your user groups. Then create an asset source configuration that points to your root folder that will contain the subdirectories. Give your user groups permission to the Asset Source (Root folder).

Then on the plugin page after you have installed the plugin. Click on the plugin to go to its settings. This is where you can configure each of your user groups to only have access to their sub-folder. =)

Huge thank you to CraftCMS, Pixel And Tonic, and Brandon for all the help. You guys are amazing!!! =)


---

### Answer by username_1 on 2015-10-08. Score: 2

This is happening because currently it’s not possible for Assets fields to resolve those dynamic subfolder paths until the element the field is associated with has been saved (in this case, your Matrix block).

If you create a new block, click the “Save and continue editing” button (or Command/Ctrl + S), then you should be able to see all of the existing images within the dynamic subfolder.

**Update**

As of [Craft 2.4.2697](http://buildwithcraft.com/updates#build2697), Craft now does attempt to resolve dynamic subfolder paths. If there’s nothing that *requires* that the element already be saved (e.g. `{id}`), it will go ahead and use the resolved path rather than the temp folder.

> **Comments:**
> **username_0**: I do save it first. The directories never match up. If I add files via the Assets at the top of the Control Panel, the files there never show up in the Matrix Block Asset Field (even after I have saved). If I upload a new file via the Matrix block, the new files don't show up in the Asset Directory listing. The directories never match up -- even though on my file system - the files are there.  
> **username_2**: @BrandonKelly will the asset fields be able to resolve those paths anytime soon? Clients think this is a bug and I'd say it actually is. If you have a required image field and the client can't select an image from previously uploaded assets then that image select field doesn't really work. I guess I could create a twig function that looks at the URI or anything available to determine what the owning entry is to get owner.slug without having saved yet. It would be nice if it just worked out of the box though.  
> **username_1**: @Justin Had another look at the code and thought of a good way to solve this, at least some/most of the time. The change has been included in today’s [2.4.2697](http://buildwithcraft.com/updates#build2697) release :)  

---

