I'm trying to assign (not upload) files to nodes programmatically.
This is the scenario:
I will create 2000 nodes and there are 2000 PDF files (one PDF per node). I don't want to upload these files via Drupal interface. I will upload all these PDF files via FTP.
These PDF files are well-named, I mean all of them have a standardized name such as {field_magazine_name}-{field_issue_number}.pdf
(under sites/default/files/pdf for example).
What I want to do is to assign these PDF files to related nodes while creating/saving the nodes.
Possible Method 1
One method to do this would be to use the File Field Sources module.
I think remote file transfer can be used with some JavaScript code. The remote file transfer input can be automatically filled with the fields I want and it will work (for example http://example.com/sites/default/files/pdf/{field_magazine_name}-{field_issue_number}.pdf
)... but I don't create nodes manually, I'm creating the nodes via Feeds. So, using JavaScript isn't the method I can use.