public function addFromRequest(UploadedFile $uploadedFile, $tag = null)
    {
        $this->getMediaAdder()
             ->performedOn($this->attachment)
             ->useMediaTag($tag)
             ->fromFile($uploadedFile);

        return $this;
    }
public function addFromRequest(UploadedFile $uploadedFile, $tag = null)
    {
        $this->getMediaAdder()
             ->performedOn($this->attachment)
             ->useMediaTag($tag)
             ->fromFile($uploadedFile);

        return $this;
    }
public function addFromRequest ( UploadedFile $ uploadedFile , $ tag = null ) { $ this -> getMediaAdder ( ) -> performedOn ( $ this -> attachment ) -> useMediaTag ( $ tag ) -> fromFile ( $ uploadedFile ) ; return $ this ; }
Creates a file object from a file an uploaded file.
@param \Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile
@param null $tag
@return self
Creates a file object from a file an uploaded file .