Hi all,

Not strictly speaking an issue, but I can't seem to find a way to achieve the following with tokens:

I am trying to save the user picture in a specific folder. For example if I'm editing user 137, I would like the picture to be saved in the folder files/user_pictures/137. Basically I am looking for a token that will give me the uid of the user I'm editing.

I can't quite find the token combination that will do that. I can't use [current-user:uid], because it will save it using my user uid (since it's me saving the picture).

I've tried [current-page:url:args:value:1], because the path is user/137/edit, so that would give me the first argument. It works fine for a single field, but my picture field has multiple images, and after the first one it saves all the other in ajax/something (I guess the path changes for the ajax request).

Any hints or suggestion would be greatly appreciated, thanks!

Hubert.

Comments

jack_ry’s picture

Issue summary: View changes

Hi Hubert,

Is it an image field in a content type you are talking about??? You said user picture which defaults to user profile. If so, there's no way to add multiple pictures for a user profile. If it's the former then you could just use [current-user:uid] which will get the current user id. Why do you want to add contents on behalf of another user? Or Am i missing something here?

Thanks