When I'm trying to upload big file (to Imgur) (3,5mb and about 5000x3000px) I got error:
500 Internal Server Error
POST http://forum.mysite.com/api/image/upload
{
"errors": [
{
"code": 500,
"title": "Internal server error",
"detail": "exception 'RuntimeException' with message 'Cannot retrieve stream due to upload error' in /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-diactoros/src/UploadedFile.php:146\nStack trace:\n#0 /home/ignivis/public_html/mysite/forum/extensions/flagrow-image-upload/src/Commands/UploadImageHandler.php(106): Zend\\Diactoros\\UploadedFile->moveTo('/home/ignivis/p...')\n#1 [internal function]: Flagrow\\ImageUpload\\Commands\\UploadImageHandler->handle(Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#2 /home/ignivis/public_html/mysite/forum/vendor/illuminate/bus/Dispatcher.php(203): call_user_func(Array, Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#3 [internal function]: Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#4 /home/ignivis/public_html/mysite/forum/vendor/illuminate/pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#5 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#6 /home/ignivis/public_html/mysite/forum/vendor/illuminate/pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#7 /home/ignivis/public_html/mysite/forum/vendor/illuminate/bus/Dispatcher.php(204): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))\n#8 /home/ignivis/public_html/mysite/forum/vendor/illuminate/bus/Dispatcher.php(177): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(Flagrow\\ImageUpload\\Commands\\UploadImage), NULL)\n#9 /home/ignivis/public_html/mysite/forum/extensions/flagrow-image-upload/src/Api/Controllers/UploadImageController.php(60): Illuminate\\Bus\\Dispatcher->dispatch(Object(Flagrow\\ImageUpload\\Commands\\UploadImage))\n#10 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(96): Flagrow\\ImageUpload\\Api\\Controllers\\UploadImageController->data(Object(Zend\\Stratigility\\Http\\Request), Object(Tobscure\\JsonApi\\Document))\n#11 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Http/GenerateRouteHandlerTrait.php(35): Flarum\\Api\\Controller\\AbstractSerializeController->handle(Object(Zend\\Stratigility\\Http\\Request))\n#12 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\\Api\\ApiServiceProvider->Flarum\\Http\\{closure}(Object(Zend\\Stratigility\\Http\\Request), Array)\n#13 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Dispatch.php(82): Flarum\\Http\\Middleware\\DispatchRoute->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#14 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#15 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(32): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#16 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Dispatch.php(82): Flarum\\Api\\Middleware\\FakeHttpMethods->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#17 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#18 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(30): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#19 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Dispatch.php(82): Flarum\\Http\\Middleware\\ParseJsonBody->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#20 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#21 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Api/Middleware/AuthenticateWithHeader.php(50): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#22 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Dispatch.php(82): Flarum\\Api\\Middleware\\AuthenticateWithHeader->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#23 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#24 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithCookie.php(42): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#25 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Dispatch.php(82): Flarum\\Http\\Middleware\\AuthenticateWithCookie->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#26 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#27 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(75): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#28 /home/ignivis/public_html/mysite/forum/vendor/zendframework/zend-diactoros/src/Server.php(166): Zend\\Stratigility\\MiddlewarePipe->__invoke(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Diactoros\\Response), NULL)\n#29 /home/ignivis/public_html/mysite/forum/vendor/flarum/core/src/Http/AbstractServer.php(33): Zend\\Diactoros\\Server->listen()\n#30 /home/ignivis/public_html/mysite/forum/api.php(16): Flarum\\Http\\AbstractServer->listen()\n#31 {main}"
}
]
}
In the Imgur upload 1.0.0 the same file uploads without any problem and you can see the uploading progress (spinning circle)!
For now I'm back to Imgur upload 1.0.0, but hope to be able to use this new version, since it has local upload also, which I just love!
Do you have any ideas about this errors?
- About local upload in 0.2.0 beta2. If you delete post or delete picture from the post it doesn't delete picture from the folder, so folder soon becames full of old unused pictures.
- in 1.0.0 when you want to make maximum photo size (for example not bigger then 800px) - it works perfect - big pictures became smaller, small pictures stay the same small size (100px, 200px, etc..). In 0.2.0 beta2 in local upload when you add Maxiumum image size (for example 800px), small pictures also resized till 800px and looks terrible, of course, so there is no possibility just to make maximum size for big pictures, not touching small pictures, it's more like strict resize.