DelphiLynx
DelphiLynx

Reputation: 921

Import images to a Pods custom content type

I try to import an image to a Podscms custom content type 'blank slate' table.

I have already created it, and want to import data via a CSV file. I have already uploaded the images, so I thought I can provide only the imagelink and it would be good to go. However, no.

Look at some code:

CSV:
My image; http://www.example.com/wp-content/uploads/image.jpg

Code to import, found in the Pods.io docs, and my question I also found in this unanswered github request: https://github.com/pods-framework/pods/issues/1530

PHP:
<?php
$api = pods_api('images');
$api->import($csvFile, false, 'csv');
?>

I get an error that the image not is found. I think I need to provide an array via CSV.But I cannot found anything about the format for that.

Upvotes: 0

Views: 263

Answers (1)

manishie
manishie

Reputation: 5322

It appears as though you're using a semicolon instead of a comma as your separator.

Upvotes: 0

Related Questions