<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">upload.module has the code you&#39;ll need to study--specifically,<br>
upload_nodeapi and upload_save.</blockquote><div><br>Note also that when you delete the original node, the original files attached to the cloned node will be deleted as well.<br><br>There is work to assign files to user instead of nodes, and afaik this would solve the problem
<br><br>Philippe<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>Note that saving file associations is limited by a permission.
<br><br>The key question to consider is, what does upload do with a *new* node? In<br>this case, any files associated with a node are those that were just<br>uploaded.<br><br> &nbsp; &nbsp;// New file upload<br> &nbsp; &nbsp;elseif (strpos($file-&gt;fid, &#39;upload&#39;) !== FALSE) {
<br><br>This won&#39;t help you, as your files array doesn&#39;t contain this marker.<br><br>Consider instead:<br><br>elseif ($node-&gt;old_vid &amp;&amp; is_numeric($fid)) {<br><br>You could consider tricking upload.module
 into doing the handling by setting<br>an old_vid. Or else just write your own handling based on upload_save.<br><br></blockquote></div><br>