Just had the 404 Not Found
bug with downloading images (preview ok). I disabled the hotlink protection
as suggested in this thread and it worked, thanks guys.
Reactivating it re-introduce the bug: {"errors":[{"status":"404","code":"not_found","detail":"<stack trace>"}]}
And here is the formatted stack trace:
Illuminate\\Database\\Eloquent\\ModelNotFoundException in /home/nginx/flarum/vendor/flagrow/upload/src/Api/Controllers/DownloadController.php:58
Stack trace:
#0 /home/nginx/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flagrow\\Upload\\Api\\Controllers\\DownloadController-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#1 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\\Http\\RouteHandlerFactory-\u003EFlarum\\Http\\{closure}(Object(Zend\\Diactoros\\ServerRequest), Array)
#2 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\DispatchRoute-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Closure)
#3 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#4 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\SetLocale-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#5 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(23): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#6 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\CheckCsrfToken-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#7 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#8 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\AuthenticateWithHeader-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#9 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#10 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\AuthenticateWithSession-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#11 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#12 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\RememberFromCookie-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#13 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#14 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\StartSession-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#15 /home/nginx/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#16 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Api\\Middleware\\FakeHttpMethods-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#17 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#18 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\ParseJsonBody-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#19 /home/nginx/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#20 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\HandleErrors-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#21 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#22 /home/nginx/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\\Stratigility\\MiddlewarePipe-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#23 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\\RequestHandler-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#24 /home/nginx/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#25 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\\BasePathRouter-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#26 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#27 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\\Stratigility\\Middleware\\OriginalMessages-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#28 /home/nginx/flarum/vendor/middlewares/base-path/src/BasePath.php(53): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#29 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\\BasePath-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))
#30 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#31 /home/nginx/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\\Stratigility\\MiddlewarePipe-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\EmptyPipelineHandler))
#32 /home/nginx/flarum/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\\Stratigility\\MiddlewarePipe-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))
#33 /home/nginx/flarum/vendor/flarum/core/src/Http/Server.php(44): Zend\\HttpHandlerRunner\\RequestHandlerRunner-\u003Erun()
#34 /home/nginx/flarum/public/index.php(22): Flarum\\Http\\Server-\u003Elisten()
#35 {main}
Flarum & upload ext all up to date.