Is it possible to use tokens to configure the upload path (under Upload destination » Root destination) e.g.

/content/0/0/[nid]

Any ideas ?

Thank you in advance.

Comments

eugenmayer’s picture

Status: Active » Fixed

the onyl "token" implemented is the uid, but its ot a token implementation, rather custom made.

I did yet not find time ( and relevancy ) implementing this. Patches are welcome though :)

W.M.’s picture

In fact I thought about organizing the files by the node number. For example, the files for node number 4423 should be under files/0/0/0/44/23 etc..

I have php codes to extract the numbers needed from node number but I am not sure how to use the results. Tokens can do that but this module does not support them.

Maybe something that will be integrated in future releases. Nice work, I must say!

eugenmayer’s picture

Thanks :)

eugenmayer’s picture

Status: Fixed » Closed (fixed)
W.M.’s picture

@EugenMayer

Hello. Do you think that the use of custom node tokens is possible now with the latest release (2.9) ?!

I guess if the new release can upload images using the CCK filefield, then doing that is possible (using upload path module).

Thanks in advance!

eugenmayer’s picture

No it has nothing to do with Filefield or Token support.

You can no upload bilder to textareas (CCK textareas) - thats it.

W.M.’s picture

Thanks for the fast reply! I am sure that the new feature will be useful for many. But let me ask, do you understand, more or less, what I am talking about? Upload path based on node tokens (e.g. nid). I am sure that this feature will be practical for large content sites. You know that the linux system has eventually limits as to how many "uid" based folders can exist under a single folder.

Maybe a nonprofessional solution is to change the upload path setting for this module each month. So no single folder will be overwhelmed.

You have a great module. I am being very honest now. Click button and add images. Cannot be simpler.

Let us see if we can extend the support to include node tokens too. I guess there is no serious code limitations here (with the current code)?

Have a blessed day!

eugenmayer’s picture

Please just open a feature request "add token support for paths". And then help implementing it :)
The use of tokens depends on the installation / customer / usecase and can vary. e.g. i dont need it at all, others could need it.

The implementation should be very easy and streight foward. ~ 10 lines.