-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Failure to show private files in s3 #10097
Comments
👋 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. |
Perhaps show more of your env vars related to s3 config |
Make sure you have
in your config as well |
I have added FILESYSTEM_DISK and it follows the bug: PRIVATE_FILESYSTEM_DISK=s3_private PUBLIC_AWS_SECRET_ACCESS_KEY=null PRIVATE_AWS_ACCESS_KEY_ID=null |
Having the same problem. I see a FIXME comment in the controller right where this happens. Is S3 support not yet complete, or is this a configuration issue? The docs aren't super clear on how to get S3 working, but I was able to use the artisan command to move files into S3, so it seems my config is at least very close to right. |
The required settings are:
(The bucket name obviously changes based on your own setup) |
Yep, that's exactly what I had, and like I said artisan was able to push the documents there. But when I removed them from the local filesystem, they could no longer be viewed through the UI, the path it was generating for them in |
P.S. There doesn't seem to be any rhyme or reason to which settings need quotes around them and which don't? |
Hello @snipe I've the same issue, I think they is 2 separated issues; The first one is an error about the warning methods name cc my patch. But after that still not work, this function manage only local files. I guess it's suppose to have a case with Do you want I create a PR with my first patch ? Edit: It's work when I force the s3 (patch):
|
Debug mode
Describe the bug
When saving files in S3, private files then can't be found because the code tries to load them from local.
Reproduction steps
PRIVATE_FILESYSTEM_DISK=s3_private
PUBLIC_FILESYSTEM_DISK=s3_public
User sign Asset delivery confirmation
The file (signature) is saved in s3
[2021-09-17 16:03:27] production.ERROR: file_get_contents(/var/www/snipeit/storage/private_uploads/signatures/siglog-aacb5585-80b0-4b46-a91b-93585e79aaf3-2021-09-17-032031.png): failed to open stream: No such file or directory
Expected behavior
I expect the files hosted in s3 to be showed.
Screenshots
Snipe-IT Version
v5.2.0 - build 6339 (master)
Operating System
Ubuntu
Web Server
Apache
PHP Version
PHP 7.4.23
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: