protected function uploadFile($options)
    {
        if ( $options['type'] === 'file' ) {
            $this->repo = new FileRepository($options);
            $this->hasFile = true;
        } else {
            $this->repo = new ImageRepository($options);
            $this->hasPhoto = true;
        }

        if ( ! $this->repo->upload($this->model, $this->request) ) {
            return false;
        }

        return $this->repo->getDatas($this->request);
    }