-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Upload Filetype Errors #2415
Comments
Snipe-IT v3 |
SnipeIT v3.6.3 build 15 (g1bf34d7)
Trying to add SVG logo in settings. my /tmp dir is chmod 777 |
@noizo are you able to upload an image of a different file type? |
Yep, uploaded jpg successfully. |
This issue occurs when trying to upload images for Asset Manufacturers as well (as of 4.1.6). I think the file type selector should only show the accepted image types, a note should be placed below the upload box and snipe-it should catch this common exception and display a user visible error. |
@snipe sorry, i'm out of the project for now, so dont have abilities to test or check |
Expected Behavior (or desired behavior if a feature request)
Image uploader catches filetype errors correctly when uploading an Asset Image.
I expected the same errors to be caught on Avatar image upload and model image upload.
I have been testing with a *.bmp file
Actual Behavior
"Whoops...."
File Type errors not caught on Avatar image upload or Model image upload.
Please confirm you have done the following before posting your bug report:
Please provide answers to these questions before posting your bug report:
Centos 7
Manual
Whoops, looks like something went wrong.
NotReadableException in Decoder.php line 40:
Unable to read image type. GD driver is only able to decode JPG, PNG or GIF files.
BREAKS: /hardware/models/create AND /account/profile
WORKS: /hardware/create
in Decoder.php line 40
at Decoder->initFromPath('/tmp/phpntcKmq') in AbstractDecoder.php line 293
at AbstractDecoder->init('/tmp/phpntcKmq') in AbstractDriver.php line 64
at AbstractDriver->init('/tmp/phpntcKmq') in ImageManager.php line 50
at ImageManager->make('/tmp/phpntcKmq') in compiled.php line 6325
at Facade::__callStatic('make', array('/tmp/phpntcKmq')) in ProfileController.php line 60
at ProfileController->postIndex()
at call_user_func_array(array(object(ProfileController), 'postIndex'), array()) in compiled.php line 9419
at Controller->callAction('postIndex', array()) in compiled.php line 9481
at ControllerDispatcher->call(object(ProfileController), object(Route), 'postIndex') in compiled.php line 9461
at ControllerDispatcher->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9938
at Pipeline->then(object(Closure)) in compiled.php line 9462
at ControllerDispatcher->callWithinStack(object(ProfileController), object(Route), object(Request), 'postIndex') in compiled.php line 9449
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\ProfileController', 'postIndex') in compiled.php line 8517
at Route->runController(object(Request)) in compiled.php line 8504
at Route->run(object(Request)) in compiled.php line 8218
at Router->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Authenticate.php line 45
at Authenticate->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckLocale.php line 40
at CheckLocale->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckLocale), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 3225
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13139
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13076
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9938
at Pipeline->then(object(Closure)) in compiled.php line 8219
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8210
at Router->dispatchToRoute(object(Request)) in compiled.php line 8200
at Router->dispatch(object(Request)) in compiled.php line 2419
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Debugbar.php line 49
at Debugbar->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Debugbar), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in TrustProxies.php line 46
at TrustProxies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(TrustProxies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForSetup.php line 22
at CheckForSetup->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForSetup), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in NosniffGuard.php line 17
at NosniffGuard->handle(object(Request), object(Closure))
at call_user_func_array(array(object(NosniffGuard), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in XssProtectHeader.php line 17
at XssProtectHeader->handle(object(Request), object(Closure))
at call_user_func_array(array(object(XssProtectHeader), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in FrameGuard.php line 17
at FrameGuard->handle(object(Request), object(Closure))
at call_user_func_array(array(object(FrameGuard), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13400
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 11943
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 3286
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9953
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9938
at Pipeline->then(object(Closure)) in compiled.php line 2366
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2350
at Kernel->handle(object(Request)) in index.php line 54
YES
app/storage/logs
and your webserver's logs.yes, but I don't think this is a problem.
The text was updated successfully, but these errors were encountered: