Skip to content

Files

Latest commit

550e46a · May 18, 2016

History

History
20 lines (13 loc) · 466 Bytes

downloader.md

File metadata and controls

20 lines (13 loc) · 466 Bytes

File downloader

Usage

Downloader service returns a Arthem uploaded file (FileInterface) in order to map it with your model.

use Arthem\Bundle\FileBundle\Model\FileInterface;

$fileDownloader = $container->get('arthem_file.file_downloader');
/** @var FileInterface $file */
$file = $fileDownloader->download('http://customwebsite.com/image.gif');

$myEntity->setFile($file);
$em->persist($myEntity);
$em->flush();

Return to index