Tokenised upload directories

splondike - December 8, 2008 - 07:22
Project:Asset
Version:6.x-1.x-dev
Component:User interface (Asset wizard)
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I want to keep things organised by putting assets related to the current
node in their own subfolder, for example for "node X" I want assets to
appear in the sites/default/files/articles/X folder. The node id will be a parameter in the upload
path. The problem is, when creating a node, the id and such have not yet been assigned.

I'm thinking about making a temporary "Current node" directory and then
moving this to the appropriate path after the node is submitted (using
hook_nodeapi).

Can anyone see a better way of doing this; how do you keep large numbers
of assets organised and manageable?

 
 

Drupal is a registered trademark of Dries Buytaert.