Snipe-it: BARCODE and QR CODE IMAGES NOT SHOW - incorrect path

Created on 27 Oct 2016  路  7Comments  路  Source: snipe/snipe-it

Expected Behavior (or desired behavior if a feature request)

I would like the program did see images correctly.


Actual Behavior

Currently the program does not show pictures of the bar codes or qr codes.
If I check the missing image path, I can see that the current location is: _http://snipe-it/hardware/5/qr_code_

If I really do I check on the file system image is not contained in this folder
but in _/var/www/snipeit/public/uploads/barcodes_

How can i fix that issue?

Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

Snipe-IT Version : 3.4
OS : Ubuntu 15.10
Installed by install.sh
The page that show this isse it's : http://snipe-it/hardware/bulkedit
I have configured the "http://snipe-it/" in the apache2 folder under sites-avaible on file snipeit.conf as virtual host

Here some screenshot

2016-10-27 15_59_52-start

The result :
image

And this is the link page from the image :

image

not sure if bug

Most helpful comment

Same issue for me which can be fixed by creating the barcodes folder and giving ownership to user docker

$:/var/www/html/public/uploads# mkdir barcodes
$:/var/www/html/public/uploads# chown -R docker barcodes/

All 7 comments

Currently the program does not show pictures of the bar codes or qr codes.
If I check the missing image path, I can see that the current location is: http://snipe-it/hardware/5/qr_code

If I really do I check on the file system image is not contained in this folder
but in /var/www/snipeit/public/uploads/barcodes

That's expected behavior. http://snipe-it/hardware/5/qr_code points to a script that creates an image file locally (in the barcodes directory) if it doesn't already exist.

What do you see when you go to http://snipe-it/hardware/5/qr_code in a browser directly? (Make sure debugging is turned on, so you can see any errors that might arise.) Also check the permissions of your public/uploads/barcodes directory.

Hy snipe ,
If i try to see the link "http://snipe-it/hardware/5/qr_code' the result is this :
image

In the meanwhile in this page the Debug it's not call ( at the bottom of the page there is not the Debug Toolbar even if it's turn on ).
The Public folder and all the subfolder are 777 , I gave them permission to remove any privileges problems .

Please tail the log file while you access the image directly to see if any errors are generated.

Same issue for me which can be fixed by creating the barcodes folder and giving ownership to user docker

$:/var/www/html/public/uploads# mkdir barcodes
$:/var/www/html/public/uploads# chown -R docker barcodes/

Thank you! Had the same problem with the docker image!

Just traced this through Chrome Developer tools (F12) and it looks like there is a bug in the path. I've had to make changes to the code to insert http:// and remove 'snipe-it' from the image src path. I have access to the qrCode as you can see from the attached after I altered the html.

image

This is the corrected code -
<img src="http://--servername--/hardware/3/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">

This is the original code -
<img src="--servername--\snipe-it/hardware/3/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">

The original code adds the base url and returns the image src link as-
'http://--servername--/hardware/--servername--/snipe-it/hardware/3/qr_code'

I hope this helps you to resolve the bug.

@ibettison this is not a bug, as far as we are aware. What do you have in your .env as your APP_URL? The code itself uses:

@if  ($snipeSettings->qr_code=='1')
     <img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
@endif

So if your APP_URL is incorrect, for example missing the http/https protocol, your image url will be broken.

screen shot 2018-04-06 at 4 27 42 pm

Also, if you've changed your APP_URL, make sure you've cleared your config cache.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WELLBOREIS picture WELLBOREIS  路  3Comments

comisso picture comisso  路  4Comments

Supsuop picture Supsuop  路  4Comments

memtech3 picture memtech3  路  4Comments

Rungea96 picture Rungea96  路  4Comments