Answers.Body: <p>Assuming you want the folders to be named after the users' IDs (since they won't change), the subpath should be <code>{id}</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-27T14:39:06.953Z
Answers.Text: Bizarrely, {id} allowed me to save the User with the uploaded Asset, but browsing the Asset section the file I uploaded does not show up in the folder created for the User ID. It's a blank folder. In fact the image doesn't show up anywhere in the Assets section.
  
  [edit] My bad, I hadn't created the folder for the asset.
  
  Thanks!
Answers.UserDisplayName: Matt Wilcox
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-27T14:31:58.617Z
Answers.LastActivityDate: 2017-03-27T14:31:58.617Z
Answers.UserDisplayName: Brandon Kelly
Answers.Body: <p>Stumbled across this looking for similar reason for error. Went with this in the end, as it adds some folder readability should I need to access uploads by user outside of the CP.</p>
  <pre><code>{% if fullName|length %}{fullName|lower}-{% endif %}{id}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-31T14:50:31.047Z
Answers.LastActivityDate: 2021-03-31T14:50:31.047Z
Answers.UserDisplayName: KevAdamson
Body: <p>when setting a Default Upload Location for a field that’s attached to a User, what’s the variable to use that would ensure the file is uploaded to the User I’m editing’s account in the back end, and not <em>my admin</em> user account - which is what {{currentUser.username}} does?</p>
  
  <p>I haven't been able to find out and everything I've tried hasn't worked. e.g., Could not resolve the subpath “{user.username}”. And {{ user.username }} uploads to a folder for my admin account.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-24T18:33:43.710Z
Comments.Text: Have you tried just `{user}` or if you're in a Matrix block, `{owner.user}`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-27T08:36:52.897Z
Comments.Text: Yep; "Could not resolve the subpath “{user}”." is what I get :/
Comments.UserDisplayName: Matt Wilcox
Tags: <assets>
Title: Default Upload Location for asset fields on a User...?
ThreadText: # Default Upload Location for asset fields on a User...?
  
  (Asked by: username_0 on 2017-03-24)
  
  when setting a Default Upload Location for a field that’s attached to a User, what’s the variable to use that would ensure the file is uploaded to the User I’m editing’s account in the back end, and not *my admin* user account - which is what {{currentUser.username}} does?
  
  I haven't been able to find out and everything I've tried hasn't worked. e.g., Could not resolve the subpath “{user.username}”. And {{ user.username }} uploads to a folder for my admin account.
  
  **Tags:** assets
  
  > **Comments:**
  > **username_1**: Have you tried just `{user}` or if you're in a Matrix block, `{owner.user}`?  
  > **username_0**: Yep; "Could not resolve the subpath “{user}”." is what I get :/  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-03-27. Score: 2 | Accepted answer
  
  Assuming you want the folders to be named after the users' IDs (since they won't change), the subpath should be `{id}`.
  
  > **Comments:**
  > **username_0**: Bizarrely, {id} allowed me to save the User with the uploaded Asset, but browsing the Asset section the file I uploaded does not show up in the folder created for the User ID. It's a blank folder. In fact the image doesn't show up anywhere in the Assets section.  [edit] My bad, I hadn't created the folder for the asset.  Thanks!  
  
  ---
  
  ### Answer by username_3 on 2021-03-31. Score: 1
  
  Stumbled across this looking for similar reason for error. Went with this in the end, as it adds some folder readability should I need to access uploads by user outside of the CP.
  
  ```
  {% if fullName|length %}{fullName|lower}-{% endif %}{id}
  
  ```
  
  
  ---
  
  