Answers.Body: <p>Assuming the Assets field on your block has a handle of <code>asset</code>, you could do:</p>
  <pre class="lang-twig prettyprint-override"><code>{object.asset.one().kind}/{owner.slug}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-13T07:03:56.250Z
Answers.Text: I already tried this approch:
  The Asset field’s Default Asset Location setting has an invalid subpath (“{object.asset.one().kind}/{owner.slug}”).
Answers.UserDisplayName: pepe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-13T08:13:35.463Z
Answers.Text: This works. What's the handle of your Assets field?
Answers.UserDisplayName: Oli
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-12T12:04:28.890Z
Answers.LastActivityDate: 2021-10-12T12:04:28.890Z
Answers.UserDisplayName: Oli
Body: <br>
  I want to create asset subfolders by page & by asset type.<br>
  I use an asset field in an matrix field for multiple asset types like video, images etc.
  <br><br>In an asset field I can access the slug of an entry by:
  <pre><code>{owner.slug}
  </code></pre>
  <p>Is there a way to access a an asset field inside an matrix block to fetch the kind for the asset subfolder? Like</p>
  <pre><code>{asset.kind}/{owner.slug}
  </code></pre>
  <p>To create an subfolder like</p>
  <pre><code>images/about-us/asset.jpg
  </code></pre>
  
Tags: <assets><matrix>
Title: Access Asset Type for subfolder
ThreadText: # Access Asset Type for subfolder
  
  (Asked by: username_0 on 2021-10-11)
  
  I want to create asset subfolders by page & by asset type.  
  I use an asset field in an matrix field for multiple asset types like video, images etc.
    
    
  In an asset field I can access the slug of an entry by:
  
  ```
  {owner.slug}
  
  ```
  
  Is there a way to access a an asset field inside an matrix block to fetch the kind for the asset subfolder? Like
  
  ```
  {asset.kind}/{owner.slug}
  
  ```
  
  To create an subfolder like
  
  ```
  images/about-us/asset.jpg
  
  ```
  
  **Tags:** assets, matrix
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-10-12. Score: 1
  
  Assuming the Assets field on your block has a handle of `asset`, you could do:
  
  ```twig
  {object.asset.one().kind}/{owner.slug}
  
  ```
  
  > **Comments:**
  > **username_0**: I already tried this approch: The Asset field’s Default Asset Location setting has an invalid subpath (“{object.asset.one().kind}/{owner.slug}”).  
  > **username_1**: This works. What's the handle of your Assets field?  
  
  ---
  
  