Share » Forums » Developer » Import image process into kernel

Import image process into kernel

Import image process into kernel

Thursday 25 June 2009 6:08:14 am - 3 replies

Author Message

Jérôme Vieilledent

Saturday 27 June 2009 3:22:25 am

Hi Thibault.

First, know that it already exists extensions to import data (<b>Data Import</b>, and I'm about to release mine, <b>NovenImportXMLStream</b>).

Now for your question, you should use the <i>fromString()</i> method of the <i>ezimage</i> datatype. Every datatypes (well at least the built-in ones) have this very useful method since eZ Publish 3.9.
So if you want to grab an external image, you must first grab it in a temporary folder on your local filesystem (in your <b>var/</b> directory for instance, check your <b>VarDir</b> directive in site.ini), and then you pass the full path (use <b>realpath</b> PHP function) of your image to the <i>fromString()</i> method.

Damien Pobel

Monday 29 June 2009 3:48:00 am

Hi,

In addition, you can have a look to ezcsvimport.php script [1] bundled with eZ Publish which is a quite simple example of what Jérôme explains.

[1] http://pubsvn.ez.no/nextgen/trunk/bin/php/ezcsvimport.php

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

thibaut colin

Tuesday 30 June 2009 2:38:18 am

Thanks for your help. I'm going to test all this.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu