����JFIF��x�x����'
| Server IP : 78.140.185.180  /  Your IP : 216.73.216.38 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/././././././public_html/common/Files/Controllers/  | 
Upload File :  | 
<?php namespace Common\Files\Controllers;
use Common\Core\BaseController;
use Common\Files\FileEntry;
use Common\Files\Response\DownloadFilesResponse;
use Common\Files\Response\FileResponseFactory;
use Illuminate\Http\Request;
class DownloadFileController extends BaseController
{
    /**
     * @var Request
     */
    protected $request;
    /**
     * @var FileEntry
     */
    protected $fileEntry;
    /**
     * @var FileResponseFactory
     */
    protected $fileResponseFactory;
    public function __construct(Request $request, FileEntry $fileEntry, FileResponseFactory $fileResponseFactory)
    {
        $this->request = $request;
        $this->fileEntry = $fileEntry;
        $this->fileResponseFactory = $fileResponseFactory;
    }
    public function download()
    {
        $hashes = explode(',', $this->request->get('hashes'));
        $ids = array_map(function($hash) {
            return $this->fileEntry->decodeHash($hash);
        }, $hashes);
        $ids = array_filter($ids);
        if ( ! $ids) {
            abort(404, 'No entry hashes provided.');
        }
        $entries = $this->fileEntry->whereIn('id', $ids)->get();
        $this->authorize('download', [FileEntry::class, $entries]);
        return app(DownloadFilesResponse::class)->create($entries);
    }
}