DataGrab File fieldtype notes

» Visit the DataGrab support page

DataGrab allows you to import files and images into the ExpressionEngine File field.

DataGrab allows you to import files and images into the ExpressionEngine File field. File fields within Matrix and Grid fields are also supported.

Pre-requisites

You will need to have set up a File Upload area.

You will also need to ensure that your PHP is configured to allow plenty of memory and not to time out.

Configuration options

Configuration options

The first pulldown menu selects the data source field that contains the file/image.

The second field allows you to choose a default upload folder.

The third field selects whether DataGrab should try and fetch images/files from specified URLs.

Field formatting options

DataGrab can accept data in 3 formats:

/images/uploads/filename.png

This will tell DataGrab to use the file filename.png stored in the file upload area with an id of 1. It won’t check to see if the file exists - this lets you do the import and then copy the file into place afterwards. Note, if you do copy the files manually you will probably need to resynchronise the folder afterwards.

filename.png

If you do not specify a file upload folder, DataGrab will use the default folder select in the configuration options.

http://mysite.com/image/filename.png

If you specifiy a URL and set the "Fetch files from urls:" option to "Yes" then DataGrab will attempt to read the file from the specified URL and copy it to the default upload folder you specified in the configuration options. It will also create any additional sizes that you have specified for that folder and resync the folder.

Example file

<root>

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

    <entry>
        <title>Load a file from a URL</title>
        <files>
            <file>http://ee2.dev/images/newmoon.jpg</file>
        <files>
    </entry>

    <entry>
        <title>Load a file from its filename</title>
        <files>
            <file>es.jpg</file>
        </files>
    </entry>

</root>