메뉴 건너뛰기

일정 용량 이상의 파일첨부시 오류

nginx로 구동중에 있고 1.xMB 이상의 파일 업로드시 파일이 사라지는 문제가 발생하여, 해결 가능한 관련 옵션값을 주고 사라지는 것은 해결했으나, 이번엔 오류가 발생하였습니다.

 

config/production/app.php의 debug를 true로 변경 후 확인해본 바로는

------------------------------------------------------------------------------

Not uploading possible file [01.jpg] The extension seems to be wrong.

------------------------------------------------------------------------------

이런 내용이 출력되었으며, laravel 로그 내용은 아래와 같습니다. 참고로, 문제가 없는 서버측과 동일하게 서버 설정도 변경해 보았으나 문제는 지속되었습니다(다만, 서버 버전 및 XE 버전 차이가 있긴 합니다).

 

 

------------------------------laravel 로그 중 관련 내용---------------------

[2019-07-16 18:11:31] production.ERROR: Not uploading possible file [01.jpg] The extension seems to be wrong. {"userId":"aaaa","email":"bbbb","exception":"[object] (Xpressengine\\Storage\\Exceptions\\InvalidFileException(code: 0): Not uploading possible file [01.jpg] The extension seems to be wrong. at /var/www/html/core/src/Xpressengine/Storage/Storage.php:192)
[stacktrace]
#0 /var/www/html/core/src/Xpressengine/Storage/Storage.php(143): Xpressengine\\Storage\\Storage->validateUploadedFile(Object(Illuminate\\Http\\UploadedFile))
#1 [internal function]: Xpressengine\\Storage\\Storage->upload(Object(Illuminate\\Http\\UploadedFile), 'public/editor')
#2 /var/www/html/core/src/Xpressengine/Interception/Proxy/ProxyTrait.php(108): call_user_func_array('parent::upload', Array)
#3 [internal function]: Proxy_Xpressengine_Storage_Storage->_proxyTargetCall('upload', Array)
#4 /var/www/html/core/src/Xpressengine/Interception/Proxy/ProxyTrait.php(92): call_user_func_array(Array, Array)
#5 [internal function]: Proxy_Xpressengine_Storage_Storage->Xpressengine\\Interception\\Proxy\\{closure}(Object(Illuminate\\Http\\UploadedFile), 'public/editor')
#6 /var/www/html/core/src/Xpressengine/Interception/ProxyInvocationHandler.php(96): call_user_func_array(Object(Closure), Array)
#7 [internal function]: Xpressengine\\Interception\\ProxyInvocationHandler->__invoke(Object(Illuminate\\Http\\UploadedFile), 'public/editor')
#8 /var/www/html/core/src/Xpressengine/Interception/ProxyInvocationHandler.php(74): call_user_func_array(Object(Xpressengine\\Interception\\ProxyInvocationHandler), Array)
#9 /var/www/html/core/src/Xpressengine/Interception/Proxy/ProxyTrait.php(94): Xpressengine\\Interception\\ProxyInvocationHandler->callProxy(Array, Object(Closure))
#10 /var/www/html/storage/app/interception/Proxy_Xpressengine_Storage_Storage.php(16): Proxy_Xpressengine_Storage_Storage->_proxyMethodCall('upload', Array)
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Proxy_Xpressengine_Storage_Storage->upload(Object(Illuminate\\Http\\UploadedFile), 'public/editor')
#12 /var/www/html/app/Http/Controllers/EditorController.php(377): Illuminate\\Support\\Facades\\Facade::__callStatic('upload', Array)
#13 [internal function]: App\\Http\\Controllers\\EditorController->fileUpload(Object(Xpressengine\\Http\\Request), '9116a616')
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('fileUpload', Array)
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\EditorController), 'fileUpload')
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\\Routing\\Route->runController()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Route->run()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#20 /var/www/html/app/Http/Middleware/AsyncExpose.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\AsyncExpose->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#23 /var/www/html/app/Http/Middleware/FreezeSEO.php(42): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\FreezeSEO->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#26 /var/www/html/app/Http/Middleware/Purifying.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\Purifying->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#29 /var/www/html/app/Http/Middleware/LangPreprocessor.php(100): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\LangPreprocessor->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(68): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#33 /var/www/html/app/Http/Middleware/ExceptAppendableVerifyCsrfToken.php(49): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\ExceptAppendableVerifyCsrfToken->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#36 /var/www/html/app/Http/Middleware/RequiredDF.php(69): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\\Http\\Middleware\\RequiredDF->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Xpressengine\\Http\\Request))
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\\Routing\\Router->runRoute(Object(Xpressengine\\Http\\Request), Object(Illuminate\\Routing\\Route))
#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(590): Illuminate\\Routing\\Router->dispatchToRoute(Object(Xpressengine\\Http\\Request))
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Xpressengine\\Http\\Request))
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Xpressengine\\Http\\Request))
#61 /var/www/html/vendor/fideloper/proxy/src/TrustProxies.php(56): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\\Proxy\\TrustProxies->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#66 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#69 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#71 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#72 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#73 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#74 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Xpressengine\\Http\\Request), Object(Closure))
#75 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Xpressengine\\Http\\Request))
#76 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Xpressengine\\Http\\Request))
#77 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#78 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Xpressengine\\Http\\Request))
#79 /var/www/html/index.php(57): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Xpressengine\\Http\\Request))
#80 {main}
"} 

  • share