CSV Import Version 2.0.2

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.

Hi,

See https://github.com/omeka/plugin-CsvImport/pull/56

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Hi,

Thanks for getting back to me.
But, in the library we have security tied with Cosign to allow creators to upload files to our server. Admin can not do that job for each creators, we have more than 19 exhibits.

Because we are behind https, we find this is the best way to handle this.
I was able in the past to add extra column in the mapping form to gave the user the choice to upload from server or url. An as I mentioned in my previous post, in this function, _addItemFromRow function: you can tell you are insert files for item as a filesystem or url. I tested this after I send my previous post yesterday and it works fine if I change it to Filesystem option. My question how to add the extra column in the mapping form?

We need to make CSVimport works behind https unless somebody able to tell me how they used it in their library with https?

Thanks for the help, but that very essential for us.
Thanks
Nancy