public function writeLazaret(File $file)
    {
        $lazaretPathname = $this->booker->bookFile($file->getOriginalName());
        $this->filesystem->copy($file->getFile()->getRealPath(), $lazaretPathname, true);

        $lazaretPathnameThumb = $this->booker->bookFile($file->getOriginalName(), 'thumb');
        try {
            $this->alchemyst->turnInto($file->getFile()->getPathname(), $lazaretPathnameThumb, $this->createThumbnailSpecification());
        } catch (ExceptionInterface $e) {
            // Ignore, an empty file should be present
        }

        return new PersistedLazaretInformation($lazaretPathname, $lazaretPathnameThumb);
    }
public function writeLazaret(File $file)
    {
        $lazaretPathname = $this->booker->bookFile($file->getOriginalName());
        $this->filesystem->copy($file->getFile()->getRealPath(), $lazaretPathname, true);

        $lazaretPathnameThumb = $this->booker->bookFile($file->getOriginalName(), 'thumb');
        try {
            $this->alchemyst->turnInto($file->getFile()->getPathname(), $lazaretPathnameThumb, $this->createThumbnailSpecification());
        } catch (ExceptionInterface $e) {
            // Ignore, an empty file should be present
        }

        return new PersistedLazaretInformation($lazaretPathname, $lazaretPathnameThumb);
    }
public function writeLazaret ( File $ file ) { $ lazaretPathname = $ this -> booker -> bookFile ( $ file -> getOriginalName ( ) ) ; $ this -> filesystem -> copy ( $ file -> getFile ( ) -> getRealPath ( ) , $ lazaretPathname , true ) ; $ lazaretPathnameThumb = $ this -> booker -> bookFile ( $ file -> getOriginalName ( ) , 'thumb' ) ; try { $ this -> alchemyst -> turnInto ( $ file -> getFile ( ) -> getPathname ( ) , $ lazaretPathnameThumb , $ this -> createThumbnailSpecification ( ) ) ; } catch ( ExceptionInterface $ e ) { // Ignore, an empty file should be present } return new PersistedLazaretInformation ( $ lazaretPathname , $ lazaretPathnameThumb ) ; }
Write a file in storage and mark it lazaret
@param File $file
@return PersistedLazaretInformation
Write a file in storage and mark it lazaret