by John Roche.
Hi Justin,
Your advice on the permissions was correct, I was using the incorrect credentials and you saved me from a lot of grief.
I was able to copy the file to the draft area eventually. With your code example I was getting an "Invalid component" error but by delving into your code example I found create_file_from_storedfile($file_record, $file); which worked fine.
I'd just like to thank you for your help, much appreciated