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
Describe the bug
Users are unable to upload images for accessories and consumables.
To Reproduce
Steps to reproduce the behavior:
Create a consumable or accessory
Select an image to upload/attach to it.
Save changes.
See Whoops error.
Expected behavior
Image Uploads.
Suspected Root Cause
It appears as though not all of the appropriate directories are being created in /var/www/html/public/uploads/. There are 13 subdirectories listed in the git project but only 9 appear in docker after downloading the image. Images uploaded for Accessories and Consumables fail after the system fails to create a directory for them. Here are the logs from pulling snipe-it:latest and listing the directory:
You can see here that several directories are missing. While uploading an image to an asset, the directory appears, but created with different group permissions:
# docker exec -it snipe-it ls -al /var/www/html/public/uploads/
total 0
drwxr-xr-x. 1 docker root 176 May 30 04:51 .
drwxr-xr-x. 1 root root 44 May 30 04:42 ..
drwxr-xr-x. 1 docker staff 60 May 30 04:51 assets
drwxr-xr-x. 1 docker root 0 May 30 04:42 avatars
drwxr-xr-x. 1 docker root 0 May 30 04:42 barcodes
drwxr-xr-x. 1 docker root 0 May 30 04:42 categories
drwxr-xr-x. 1 docker root 0 May 30 04:42 companies
drwxr-xr-x. 1 docker root 0 May 30 04:42 departments
drwxr-xr-x. 1 docker root 0 May 30 04:42 locations
drwxr-xr-x. 1 docker root 0 May 30 04:42 manufacturers
drwxr-xr-x. 1 docker root 0 May 30 04:42 models
You can have images upload successfully by creating the directories manually. Granted your container name is snipe-it you could run these four commands to create them for you:
The text was updated successfully, but these errors were encountered:
ParadoxGuitarist
changed the title
Bug: Missing Directories in public/uploads Cause Errors for Accessory/Consumable Pictures
Bug: Missing Directories in public/uploads Cause Errors for Accessory/Consumable/Component Pictures
May 30, 2018
Please confirm you have done the following before posting your bug report:
Describe the bug
Users are unable to upload images for accessories and consumables.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Image Uploads.
Suspected Root Cause
It appears as though not all of the appropriate directories are being created in /var/www/html/public/uploads/. There are 13 subdirectories listed in the git project but only 9 appear in docker after downloading the image. Images uploaded for Accessories and Consumables fail after the system fails to create a directory for them. Here are the logs from pulling snipe-it:latest and listing the directory:
You can see here that several directories are missing. While uploading an image to an asset, the directory appears, but created with different group permissions:
Error Messages
Work Around - Fix - Patch
You can have images upload successfully by creating the directories manually. Granted your container name is snipe-it you could run these four commands to create them for you:
Additional context
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: