eZ Community » Forums » Developer » sqliimport images
expandshrink

sqliimport images

sqliimport images

Friday 29 June 2012 11:25:21 am - 1 reply

Hello,

I'm working on an import using sqliimport I have an image that I have to fill a path but path is absoule?
is that you have an idea?

Friday 29 June 2012 1:30:09 pm

Finally I opted for the solution:

Create the image in local,

Using something like this:

$this->cacheDir = 'var/site/jobs/';

$cacheImage = $this->cacheDir.basename(";" title="http://www.yourdomaine.com/episode.jpg"blunk.gif Emoticon;">http://www.yourdomaine.com/episode.jpg"blunk.gif Emoticon;

$imageData = eZHTTPTool::getDataByURL( "http://www.yourdomaine.com/episode.jpg" );

$f = fopen( $cacheImage, 'w+' );

fwrite( $f, $imageData );

fclose( $f );

$content->fields->image = $cacheImage;

 

thanks 

expandshrink

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

36 542 Users on board!

Forums menu