Created
July 14, 2015 11:27
-
-
Save DavidHernandez/38b82c64340423b5fdd9 to your computer and use it in GitHub Desktop.
Save a remote file into local storage and add it to a file field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = system_retrieve_file($remote_file_url); | |
$node->field_image[$node->language][] = (array) $file; | |
node_save($node); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment