title: Drupal 6 Programmatically adding an image to a FileField
body: <p>How do I programmatically add an image to a file field? I have an url/filepath of an image that I wish to upload. I have tried the following:</p>
  
  <pre><code>$newNode-&gt;field_profile_image[0]['value'] = 'http://www.mysite.com/default.gif';
  </code></pre>
  
  <p>But it does not seem to work.</p>
  
  <p>I have also tried:</p>
  
  <p>$newNode->field_profile_image[0]['value'] = 'sites/default/files/default.gif';</p>
  
  <p>The file does not need to be external to the webiste. I am happy to have it anywhere on the site in question.</p>