I am getting this error while uploading a watermark image,
POST https://forum.example.com/api/fof/watermark
{
"errors": [
{
"status": "500",
"code": "unknown",
"detail": "Illuminate\\Contracts\\Container\\BindingResolutionException: Target [League\\Flysystem\\FilesystemInterface] is not instantiable while building [FoF\\Upload\\Api\\Controllers\\WatermarkUploadController]. in /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php:945\nStack trace:\n#0 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(785): Illuminate\\Container\\Container->notInstantiable('League\\\\Flysyste...')\n#1 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(658): Illuminate\\Container\\Container->build('League\\\\Flysyste...')\n#2 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(609): Illuminate\\Container\\Container->resolve('League\\\\Flysyste...', Array)\n#3 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Foundation/Application.php(521): Illuminate\\Container\\Container->make('League\\\\Flysyste...', Array)\n#4 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(912): Flarum\\Foundation\\Application->make('League\\\\Flysyste...')\n#5 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(840): Illuminate\\Container\\Container->resolveClass(Object(ReflectionParameter))\n#6 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(807): Illuminate\\Container\\Container->resolveDependencies(Array)\n#7 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(658): Illuminate\\Container\\Container->build('FoF\\\\Upload\\\\Api\\\\...')\n#8 /home/adsthrdk/example.com/forum/vendor/illuminate/container/Container.php(609): Illuminate\\Container\\Container->resolve('FoF\\\\Upload\\\\Api\\\\...', Array)\n#9 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Foundation/Application.php(521): Illuminate\\Container\\Container->make('FoF\\\\Upload\\\\Api\\\\...', Array)\n#10 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(74): Flarum\\Foundation\\Application->make('FoF\\\\Upload\\\\Api\\\\...')\n#11 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(34): Flarum\\Http\\RouteHandlerFactory->resolveController('FoF\\\\Upload\\\\Api\\\\...')\n#12 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\\Http\\RouteHandlerFactory->Flarum\\Http\\{closure}(Object(Laminas\\Diactoros\\ServerRequest), Array)\n#13 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\DispatchRoute->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Closure))\n#14 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#15 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\SetLocale->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#16 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(45): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#17 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\CheckCsrfToken->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#18 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#19 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\AuthenticateWithHeader->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#20 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#21 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\AuthenticateWithSession->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#22 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#23 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\RememberFromCookie->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#24 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#25 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\StartSession->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#26 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#27 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Api\\Middleware\\FakeHttpMethods->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#28 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#29 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\ParseJsonBody->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#30 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#31 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\\Http\\Middleware\\HandleErrors->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#32 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#33 /home/adsthrdk/example.com/forum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\\Stratigility\\MiddlewarePipe->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#34 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\\RequestHandler->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#35 /home/adsthrdk/example.com/forum/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#36 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\\BasePathRouter->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#37 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#38 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\\Stratigility\\Middleware\\OriginalMessages->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#39 /home/adsthrdk/example.com/forum/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#40 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\\BasePath->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\Next))\n#41 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\\Stratigility\\Next->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#42 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\\Stratigility\\MiddlewarePipe->process(Object(Laminas\\Diactoros\\ServerRequest), Object(Laminas\\Stratigility\\EmptyPipelineHandler))\n#43 /home/adsthrdk/example.com/forum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\\Stratigility\\MiddlewarePipe->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#44 /home/adsthrdk/example.com/forum/vendor/flarum/core/src/Http/Server.php(42): Laminas\\HttpHandlerRunner\\RequestHandlerRunner->run()\n#45 /home/adsthrdk/example.com/forum/public/index.php(26): Flarum\\Http\\Server->listen()\n#46 {main}"
}
]
}
I already have a watermark configured and it is still working, but uploading a new watermark gives the above errors
UPDATE : Since the dashboard wasn't working I opened up filemanager in cpanel and went to Flarum's /storage and found my previous watermark
then I replaced the image file with my new one, keeping the filename same. and it worked.
BUT I still want the upload system in dashboard to work