File Sideload

The File Sideload module adds the ability to ingest media files that are already stored on the server where your Omeka S installation lives. New options will appear when uploading media to your items: « Sideload » for choosing individual files from your server, or « Sideload directory » for choosing folders full of files.

File Sideload is compatible with CSV Import. When installed, your CSV Import options will include the ability to add media via filenames in your Sideload directory. Be sure to disable file deletion in the File Sideload module when using it with CSV Import.

Créer un répertoire

Créez un répertoire (dossier) sur votre serveur. Il peut être au sein du répertoire du module File Sideload ou au même niveau que l’instance Omeka S.

!!! note If you place your sideload directory anywhere inside your Omeka installation, including inside the module directory (youromekainstall/modules/FileSideload/yourdirectory), be careful not to delete or move it when updating the installation or module. You may see error messages when editing items or media if the sideload directory cannot be found. Return to the module configuration page to fix this issue.

Upload or move files into this directory. All files and folders must be in this directory to be accessible.

Note that when browsing these files from the module to add as media, you will only see the filenames and folder names, so you should name resources as clearly as possible (for example, « StudyInScarlet_coverpage.jpg » will be more helpful than « img001.jpg »).

Configuration

Après avoir installé le module, il faudra le configurer pour indiquer où se trouve le répertoire.

Depuis la page des modules de la navigation de gauche, descendez jusqu’à File Sideload dans la liste et cliquez sur le bouton « Configurer ».

Le module File Sideload a deux options de configuration.

Exemple d'écran de configuration

Répertoire de chargement : le chemin, relatif à la racine du serveur, du répertoire dans lequel les fichiers sont stockés. Il devrait ressembler à :

  • /var/www/html/yourinstallationpath/omeka-s/sideload-media

  • /home/yourusername/yourwebsite.org/omeka-s/sideload-files (a typical path for shared hosting)

  • /home/yourusername/public_html/omeka-s/modules/FileSideload/sideload (a typical path for cPanel users).

Si vous avez accès shell au répertoire par un terminal, vous pouvez copier et coller le résultat de la commande “pwd”.

Si vous utilisez une application FTP, copiez le chemin du site dans la barre de localisation de l’application.

Supprimer les fichiers chargés ?

  • If checked, any file added to an item as media will be deleted from the Sideload directory, as the file is now saved as media in the Omeka S installation.

  • Si la case n’est pas cochée, les fichiers demeurent dans le répertoire jusqu’à ce que vous les supprimiez manuellement.

Ajouter un fichier sideload à un contenu

Une fois Sideload installé et configuré, et des fichiers chargés dans le répertoire, vous pouvez utiliser le module pour ajouter des médias à vos contenus.

When editing an item, go to the Media tab. The « Add media » sidebar now includes two buttons for Sideload (below the core options).

An item's media tab in the editing mode is shown. Two entries in the sidebar from Sideload have already been added to the main field.

Clicking on either of the buttons adds a Sideload media block. Adding a single file creates two fields:

  • Titre : Donnez un nouveau titre au média (optionnel).

  • File: Select a file from this dropdown menu. The menu will load the file names as they appear in the directory. Select one from the dropdown and save your changes.

Menu déroulant avec les options de médias Sideload, affichant des noms de fichiers

Adding media by directory creates three fields:

  • Title: Give the media file a new title (optional). This title will apply to all added media identically.

  • Directory: Select a folder from this dropdown menu. The menu will load the folder names as they appear in the directory.

  • Ingest directory recursively: Checking this box will include both all media from the sideload folder you chose and all media from all folders inside that folder.

Sideload media options with the dropdown open, displaying file names

Remember that File Sideload has a module-wide setting to delete files when ingested through this process. When you are sure your settings are correct, save the changes to the item. You should see the file or files added as media in the media section of the sidebar.

Intégration à Import CSV

With CSV Import, you can add media to items via File Sideload. Provide a column with the filenames, not full URLs, pointing to the files in your Sideload directory. Add the mapping to Media source > Sideload.

When using CSV Import with your Sideload directory, we recommend you un-check the file deletion setting in the File Sideload module configuration. CSV Import may delete files from your Sideload directory even if an import job has failed or stalled. You should always manually check the results of CSV Import before deleting the files it has imported.