You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior (or desired behavior if a feature request)
PDF successfully attached to a New Asset
Actual Behavior
I'm in the "New Asset" form and the only button I see to attach a document is "Upload Image".
If I use it to upload a PDF, I get an Error 500.
It seems it accepts only images.
Please confirm you have done the following before posting your bug report:
Please provide answers to these questions before posting your bug report:
Version of Snipe-IT you're running
v2.1.0-55-g701c16f
What OS and web server you're running Snipe-IT on
Ubuntu 14.04 - Apache 2.4.7
What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
manual
If you're getting an error in your browser, include that error
Oh no!
Server Error: 500 (Internal Server Error)
What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
hardware/create
If a stacktrace is provided in the error, include that too.
Intervention \ Image \ Exception \ NotReadableException
Unable to read image from file (/tmp/phpIqb8fA).
Open: /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php
* @return \Intervention\Image\Image
*/
public function initFromPath($path)
{
$info = @getimagesize($path);
if ($info === false) {
throw new \Intervention\Image\Exception\NotReadableException(
"Unable to read image from file ({$path})."
);
Include any additional information you can find in app/storage/logs and your webserver's logs.
[2016-04-19 10:36:51] production.ERROR: exception 'Intervention\Image\Exception\NotReadableException' with message 'Unable to read image from file (/tmp/phpIqb8fA).' in /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php:20
Stack trace:
#0 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php(293): Intervention\Image\Gd\Decoder->initFromPath('/tmp/phpIqb8fA') Fix depreciation math #1 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php(64): Intervention\Image\AbstractDecoder->init('/tmp/phpIqb8fA') Ability for admin to check out an asset to a user #2 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/ImageManager.php(50): Intervention\Image\AbstractDriver->init('/tmp/phpIqb8fA') Add reports - depreciation, people with no assets, etc #3 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php(57): Intervention\Image\ImageManager->make('/tmp/phpIqb8fA') Add category back to Models blade/controller #4 /var/www/html/snipe-it/app/controllers/admin/AssetsController.php(201): Intervention\Image\ImageManagerStatic::make('/tmp/phpIqb8fA') Needs sexy dashboard summary #5 [internal function]: Controllers\Admin\AssetsController->postCreate() Disallow models/depreciations/categories to be deleted if they have assets associated #6 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array) Add location to users, propagate those to assets #7 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('postCreate', Array) Figure out how to handle multi-seat licenses #8 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(Controllers\Admin\AssetsController), Object(Illuminate\Routing\Route), 'postCreate') Search box isn't hooked up to anything #9 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(967): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Controllers\Adm...', 'postCreate') Improve UI of category display to show nesting #10 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}() Build-out ACLs to set who can view which sections (reports, etc) #11 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array) A user (non-admin) should be able to request an asset [$15] #12 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request)) Column sorting on table displays #13 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) Add "clone" option in edit screen for assets #14 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) Option to mark assets as requestable. #15 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request)) Child assets linked to parent assets (HDD, replacement parts, etc) [$100] #16 /var/www/html/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true) Add warrantee field to assets/models #17 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true) Move validation out of the controllers and into the models where it belongs #18 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true) Seed database with models, manufacturers, categories, etc. #19 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true) Import functions for users, assets, models, etc #20 /var/www/html/snipe-it/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true) Merge licenses table into assets table #21 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request)) Fix depreciation on model vs asset #22 /var/www/html/snipe-it/public/index.php(49): Illuminate\Foundation\Application->run() Support multiple companies [$500 awarded] #23 {main} [] []
Indicate whether or not you've manually edited any data directly in the database
nope
The text was updated successfully, but these errors were encountered:
Expected Behavior (or desired behavior if a feature request)
PDF successfully attached to a New Asset
Actual Behavior
I'm in the "New Asset" form and the only button I see to attach a document is "Upload Image".
If I use it to upload a PDF, I get an Error 500.
It seems it accepts only images.
Please confirm you have done the following before posting your bug report:
Please provide answers to these questions before posting your bug report:
v2.1.0-55-g701c16f
Ubuntu 14.04 - Apache 2.4.7
manual
Oh no!
Server Error: 500 (Internal Server Error)
hardware/create
Intervention \ Image \ Exception \ NotReadableException
Unable to read image from file (/tmp/phpIqb8fA).
Open: /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php
GET Data empty
yes
app/storage/logs
and your webserver's logs.[2016-04-19 10:36:51] production.ERROR: exception 'Intervention\Image\Exception\NotReadableException' with message 'Unable to read image from file (/tmp/phpIqb8fA).' in /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php:20
Stack trace:
#0 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php(293): Intervention\Image\Gd\Decoder->initFromPath('/tmp/phpIqb8fA')
Fix depreciation math #1 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php(64): Intervention\Image\AbstractDecoder->init('/tmp/phpIqb8fA')
Ability for admin to check out an asset to a user #2 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/ImageManager.php(50): Intervention\Image\AbstractDriver->init('/tmp/phpIqb8fA')
Add reports - depreciation, people with no assets, etc #3 /var/www/html/snipe-it/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php(57): Intervention\Image\ImageManager->make('/tmp/phpIqb8fA')
Add category back to Models blade/controller #4 /var/www/html/snipe-it/app/controllers/admin/AssetsController.php(201): Intervention\Image\ImageManagerStatic::make('/tmp/phpIqb8fA')
Needs sexy dashboard summary #5 [internal function]: Controllers\Admin\AssetsController->postCreate()
Disallow models/depreciations/categories to be deleted if they have assets associated #6 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
Add location to users, propagate those to assets #7 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('postCreate', Array)
Figure out how to handle multi-seat licenses #8 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(Controllers\Admin\AssetsController), Object(Illuminate\Routing\Route), 'postCreate')
Search box isn't hooked up to anything #9 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(967): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Controllers\Adm...', 'postCreate')
Improve UI of category display to show nesting #10 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}()
Build-out ACLs to set who can view which sections (reports, etc) #11 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
A user (non-admin) should be able to request an asset [$15] #12 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
Column sorting on table displays #13 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
Add "clone" option in edit screen for assets #14 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
Option to mark assets as requestable. #15 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
Child assets linked to parent assets (HDD, replacement parts, etc) [$100] #16 /var/www/html/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
Add warrantee field to assets/models #17 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
Move validation out of the controllers and into the models where it belongs #18 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
Seed database with models, manufacturers, categories, etc. #19 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
Import functions for users, assets, models, etc #20 /var/www/html/snipe-it/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
Merge licenses table into assets table #21 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
Fix depreciation on model vs asset #22 /var/www/html/snipe-it/public/index.php(49): Illuminate\Foundation\Application->run()
Support multiple companies [$500 awarded] #23 {main} [] []
nope
The text was updated successfully, but these errors were encountered: