How do I import media?

For a customer I’ll soon be importing bulk product data, including pictures and documents. How can I connect these media to the products in question?

Several approaches are possible. Which approach is the most suitable depends on the circumstances.

  1. If the application is self-hosted (i.e. you have access to the server) you could upload the files into the upload directory, and then use the import engine to import references to those files into the files table, media records into the media table, and links between the product and the media into the productmedia table. The import source could simply be an xlsx or csv file in this approach.

  2. If you don’t have access to the upload folder, you can still import files, but they need to be encoded in a specific way in an XML file. The easiest way to achieve this is to create an export definition (with embedded import definitions) for productmedia, media and files, and export one existing productmedia record from the application. You can use that exported XML file as a template for importing your data. Note: the files are embedded in the XML file as base64 encoded data.

  3. Files and records can also be created through the default SOAP web service that is part of every Novulo application. If you are familiar with programming SOAP clients, you could use that to upload the files and link them to (product)media.

Thanks Wim :grinning:,
I’ll give option 2 a shot, that seems most applicable to the current situation.