Hi Andrew,
The above code should work.
Your custom task TS90000043 was copied from standard user decision task TS00008267 right?
For testing just try with stdandard task TS00008267.
Also In the workflow log, where did you check for the attachment. You need to check at the particular task[Step] and need to check fir attach_objects container.
Because if binding is not done, you can't get the value in workflow container.
Thanks,
Viji.