Search code examples
laravellaravel-9laragonunisharp-file-manager

Unisharp Laravel-filemanager cant upload on laragon server


when i try to upload an image with laragon server (https://myblog.test) it can't be uploaded

Screenshot

log

dropzone.min.js:1 POST https://myblog.test/filemanager/upload 500 (Internal Server Error)

but when i try with (php artisan serve), the file uploads fine.

I didn't change anything in config/filesystem.php

how to fix it?

UniSharp\LaravelFilemanager\LfmUploadValidator::__construct(): Argument #1 ($file) must be of type Symfony\Component\HttpFoundation\File\UploadedFile, null given, called in C:\laragon\www\myblog\vendor\unisharp\laravel-filemanager\src\LfmPath.php on line 246

my .env

APP_URL=https://myblog.test/

my routes

Route::middleware(["auth"])->group(function () {

Bla Bla Bla

// Filemanager
Route::group(['prefix' => 'filemanager'], function () {
    Route::get('/index', [\App\Http\Controllers\FileManagerController::class, 'index'])->name('filemanager.index');
    \UniSharp\LaravelFilemanager\Lfm::routes();
});

Bla Bla Bla

});

Solution

  • set

    upload_tmp_dir = c:\laragon\tmp
    

    in php.ini

    also I think you can see error in browser console.