Question:

Should the initial selected subfolder in the 'Add an asset' dialog be the Default Upload Location?

Jeremiah: 5 days ago

Using Craft Pro 2.2.2601, I am finding the asset selection mechanic a little confusing from a UX perspective when I am using {slug} in the asset field's 'Default Upload Location' to place assets in correct subfolders.

When I drag assets directly onto an asset field, it places the asset in the specified subfolder correctly. However, when I click on the Add an Asset button, the asset dialog opens with the root asset folder selected, so clicking the Upload files button causes the file to be added to the root folder by default. When this happens, the {slug} subfolder is generated anyway, with no contents.

It would make more sense to me if this generated subfolder was automatically selected so that the asset is placed in there. Having to navigate down the directory structure manually is a bit annoying and fiddly, and if a client forgets to do this then they are left with an empty {slug} subfolder.

Is this a bug or intended behaviour?

Answer:
Luke: 5 days ago

The Default Upload Location setting only applies to drag-n-drop uploads, as well as front-end uploads if you are creating your own entry form with a <input type="file"/> input.

If you want to force files to be placed in a {slug} subfolder, you should check the "Restrict uploads to a single folder" checkbox in your Assets field's settings.