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.

  • Have you tried just {user} or if you're in a Matrix block, {owner.user}?
    – Brad Bell
    Commented Mar 24, 2017 at 18:33
  • Yep; "Could not resolve the subpath “{user}”." is what I get :/ Commented Mar 27, 2017 at 8:36

2 Answers 2


Assuming you want the folders to be named after the users' IDs (since they won't change), the subpath should be {id}.

  • 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! Commented Mar 27, 2017 at 14:39

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.