{{ ta('import_files', 'Import Files') }}

{{ msg_page_notifications|raw }}

{{ ta('bulk_import', 'Bulk Import') }}

{% if startImport == false %}
{{ ta('fileimport_import_files_guidance', '

Use the form below to bulk import files into the database on the current server. If you require files to be imported onto an external file server, please load the admin area directly on that server and open this page.

Upload the files into a sub-folder on your server and select it below. Note that this process doesn\'t move or copy the files into the script storage. It\'ll create an entry in the database, you\'ll then need to copy the files into the folder [[[DOC_ROOT]]]/files/imported/

IMPORTANT: If you have a lot of files to import, server timeouts can cause the import process to fail. We\'d recommend using the "Manual Import" process via the command line instead. You should be able to run the import multiple times and it\'ll pickup where it failed until complete.

', {'DOC_ROOT': DOC_ROOT})|raw }}

{{ ta('path_to_script_installation', 'Path to script installation') }}: {{ DOC_ROOT }}

{{ ta('the_account_username_to_import_the_files_into', 'The account username to import the files into. Start typing to find the account.') }}

{{ ta('updated_with_the_folder_list_of_the_above_users_account', 'Updated with the folder list of the above users account. Files will be placed directly in this folder.') }} ({{ ta('reload', 'reload') }})

{{ ta('file_import_manual_import_guidance', '

The import script enables you to migrate your existing \'offline\' files into the script. It can be run on your main server aswell as file servers.

First download the import.php script. This can also be found in:

[[[DOC_ROOT]]]/plugins/fileimport/offline/import.php.txt (rename to import.php)

Populate the constants in [[[SQUARE_BRACKET]]] at the top of import.php. i.e. FILE_IMPORT_ACCOUNT_NAME, FILE_IMPORT_PATH, FILE_IMPORT_ACCOUNT_START_FOLDER

Save and upload the file, either to the Yetishare root of your main site or the Yetishare root of a file server. The Yetishare root path is the same location as this file: _config.inc.php

Using FTP or WinSCP, upload or move all the files you want to import to a folder on that server. This should be outside of the Yetishare installation (FILE_IMPORT_PATH in import.php).

Execute the script on the command line (via SSH) using PHP. Like this:

php {{ DOC_ROOT }}/import.php

The import will complete with progress onscreen. Files will not be moved, they\'ll be added to the database, so you will need to manually move them into [[[DOC_ROOT]]]/files/imported/ after the import.

Once the import is complete, ensure you remove the import.php script from your Yetishare root.

', {'DOC_ROOT': DOC_ROOT, 'ADMIN_WEB_ROOT': ADMIN_WEB_ROOT})|raw }}
{% else %}

{{ ta('importing_files_from_import_path_please_check_below_for_progress', 'Importing files from [[[IMPORT_PATH]]], please check below for progress. Note that this process can take some time.', {'IMPORT_PATH': import_path}) }}

{% endif %}