Assets

Currently the Assets fieldtype only supports assigning existing images in Assets to a field value through an import file. It does not upload an image from a remote URL or local file path.

When defining a file you can provide just the file name, or the file name prefixed with the file upload directory variable if you know it. When the import is executed Assets will see if a file of that name already exists, and if so it will assign the file_id value to the Assets field in the entry being imported. If the file does not exist no file will be added to the Assets field when the entry is imported.

<root>
    <entry>
        <title>Load a file from a upload folder</title>
        <files>
            <file>bnb5.png</file>
        </files>
    </entry>

    <entry>
        <title>Load a file from a URL</title>
        <files>
            <file>{filedir_1}newmoon.pdf</file>
        <files>
    </entry>
</root>

Last updated