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
Since Snipe-IT 6.0.1 (or 6.0.0, I'm not sure) was released, I noticed that the /hardware/:id page was crashing (500 error) for hardware that had at least 1 uploaded file.
I found the issue and tested a patch on my instance successfully.
Basically: it works when using Storage::size() instead of filesize() because it follows Laravel's FS configuration instead of just trying to read a path on the local FS.
I found a related issue (#11150) and described my solution in a comment (#11150 (comment)) but as the issue was closed I suspect it was not read.
This issue was confirmed by @minkbear.
Since 6.0.10, this issue does not crash the page anymore (since @ was added in front of the call to filesize()), but the file size is still not correct.
Reproduction steps
Configure a Snipe-IT instance ≥ 6.0.1 with S3 storage
Create a hardware and store a file
Go to the hardware page and the files tab, and check the displayed file size
Expected behavior
I expect the file size to be correct, as shown in the following screenshots.
Screenshots
With 6.0.10:
File size is incorrect.
With patched 6.0.10 (same data/config):
File size is correct.
Snipe-IT Version
6.0.10
Operating System
Linux (whatever Clever Cloud is using, I think it is Exherbo)
Web Server
Apache
PHP Version
8.0.21
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Debug mode
Describe the bug
My instance of Snipe-IT is hosted on Clever Cloud and I use their Ceph-based S3 Object Storage to store uploads.
Storing and reading files works well.
Since Snipe-IT
6.0.1
(or6.0.0
, I'm not sure) was released, I noticed that the/hardware/:id
page was crashing (500 error) for hardware that had at least 1 uploaded file.I found the issue and tested a patch on my instance successfully.
Basically: it works when using
Storage::size()
instead offilesize()
because it follows Laravel's FS configuration instead of just trying to read a path on the local FS.I found a related issue (#11150) and described my solution in a comment (#11150 (comment)) but as the issue was closed I suspect it was not read.
This issue was confirmed by @minkbear.
Since
6.0.10
, this issue does not crash the page anymore (since@
was added in front of the call tofilesize()
), but the file size is still not correct.Reproduction steps
6.0.1
with S3 storageExpected behavior
I expect the file size to be correct, as shown in the following screenshots.
Screenshots
With
6.0.10
:File size is incorrect.
With patched
6.0.10
(same data/config):File size is correct.
Snipe-IT Version
6.0.10
Operating System
Linux (whatever Clever Cloud is using, I think it is Exherbo)
Web Server
Apache
PHP Version
8.0.21
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: