I want to use image publishing to do bulk image uploads, but there does not seem to be a way of applying terms from a vocabulary to them while they are uploaded. This would be really useful since I am restricting access (using Taxonomy access) to images based on user roles. As it stands, for the time that they are uploaded until they are re-categorised they have no taxonomy and hence are viewable by anonymous users.

I've tried using Taxonomy Defautls to force images to default to a "private" access term, but Image publishing seems to bypass this.

Comments

nwe_44’s picture

Status: Active » Closed (fixed)

In case anyone is interested in how I solved this, I added the following below line 254;

$this_term = taxonomy_get_term(42);
$node->taxonomy[42] = $this_term;

where 42 is the vid of my "Private" term. Now all images uploaded through image_publish are private. This hack is inelegant, but it serves my purposes for the moment.