Hi,
I have two questions regarding the Csvimpot v 2.02
1- Is it possible to upload file from the server and not to include a Url. I am talking here a bout a file that will be attached to an item. So e.g, if I do have a test.csv file then I do have
Title, Subject, File
"test new item", "","/images/test.jpg"
2- If that is impossible and I have to include to add the url for the jpg image then in the past version of Csvimport I was able to add some code that allow me to read the jpg from the file system not from url. E.g in the import.php I was able to add under _addItemFromRow function:
foreach($fileUrls[0] as $url) {
//$this->_log($url, Zend_Log::INFO);
try {
$file = insert_files_for_item($item,
'Filesystem', $url,
array(
'ignore_invalid_files' => false,
)
);
} catch (Omeka_File_Ingest_InvalidException $e) {
$msg = "Error occurred when attempting to ingest the "
. "following URL as a file: '$url': "
. $e->getMessage();
$this->_log($msg, Zend_Log::INFO);
$item->delete();
return false;
}
release_object($file);
}
So I added a new column to read from filesystem as well as from the url.
For the new version I had difficulty to add a new column with check boxes as well as debug the code inside the addItemFromRow
Any help really appreciated.