-
-
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
Upload File Help-Block allowed file size is 8M but actual is 2M #6251
Comments
Are there any file size restrictions on your web server? |
No, it is my own NAS |
@EarlRamirez with the next lines: And it started to work. So I assume there is still a bug in the default docker image, how this setting is set and / or used in code. |
@tmvillain13 thanks for the update, never used the docker images but will certainly have a look and create a PR if your solution doesn't create any conflicts. |
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. |
UP |
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! |
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. |
+1 . Relevant for us |
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! |
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. |
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it. |
Issue is still relevant. Encountered it today on a new SnipeIT docker installation |
I am running into this as well. Can we re-open the issue? |
Yep had the same experience on a new Snipe installation. This must be sorted as the software is not functioning as stated |
same problem here also |
For those still having an issue, I had a similar issue and fixed it by editing |
This is still an issue on the latest docker version. /etc/php/7.1/apache2/php.ini has upload_max_filesize = 2M |
@snipe this problem is still present in the latest Docker Image. Most users using the software from Mobile or Tablets cannot choose the file size of the photo that the camera will make. So this will become more problematic moving forward as newer cameras will generate bigger images by default. For this use case's it would be useful to have a resize checkbox when uploading a photo. |
@baditaflorin the limitation is on the server end. We do resize image uploads, but there are PHP limitations on file uploads. We attempt to check what the server is configured to handle and disallow anything higher than that, since the server will reject the upload if it’s larger than that. |
I am using the Docker container.
It would be useful if we could set this when starting the container
…On Sat, Nov 14, 2020, 23:19 snipe ***@***.***> wrote:
@baditaflorin <https://github.com/baditaflorin> the limitation is on the
server end. We do resize image uploads, but there are PHP limitations on
file uploads. We attempt to check what the server is configured to handle
and disallow anything higher than that, since the server will reject the
upload if it’s larger than that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6251 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARZC52QDPARXAXWZS6R233SP3X6TANCNFSM4FXW775A>
.
|
We can fix this in the Dockerfile itself without too much difficulty. I'll re-open this and put it on my plate. |
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! |
1 similar comment
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! |
Issue is still present in the latest docker image, please fix:
|
"For those still having an issue, I had a similar issue and fixed it by editing I am somewhat new. I found the correct path and used What command do I need to use to change it from 2M to 10M? Regards |
@uberbrady can you please address this when you're back from vacation? Thanks :) |
Having the same issue. |
@kmpc808 You can use just about any file editor (I use NANO) from the cli as follows - I'm using php 7.4 your version may be different:
I'm not 100% sure if a git-pull (the recommended update method) will over write these changes - I doubt it, but maybe @snipe or @uberbrady can comment for certainty. Otherwise, it's a pretty straight-forward and common change that is pretty easy to accomplish. |
It’s definitely a good question - but, no, we do not overwrite php.ini values anywhere that I know of. And if we do, we should probably not. |
Can you please increase the upload size for the docker container?THanks! |
I'd be happy to take a PR that made the above-mentioned change if it works. |
|
If you can create a Pull Request (PR) with your proposed changes, I would be happy to accept (and merge) them. |
@uberbrady I am not knowledgeable enough for PR |
@stepanov1975 thank you for this! was jumping through hoops trying to figure this one out. really appreciate it. |
@jcookatlas also thank you for the help as well! |
@stepanov1975 thank you |
With ^this new way, a was able to increase upload limit limit to 8M. But I've set the number to 50M. My steps:
I even tried to modify
And even tried that to add as env value to docker-file:
And still displaying only 8M |
if you typo'ed the upload limit - as `PHP_UPLOD_LIMIT` - then it won't work.
But when I change that environment variable, it *does* change the
maximum upload size for me.
…On Wed, Aug 31, 2022 at 4:05 AM SonGokussj4 ***@***.***> wrote:
With ^this new way, a was able to increase upload limit limit to 8M. But I've set the number to 50M.
My steps:
Open snipeit asset, upload, select file bigger than 2MB, error
Open mounted /php/php-local.ini, add a new line upload_max_filesize = 50M, save the file, down docker, up docker
open snipeit asset, upload, select file 6 MB, everything works (but it shows 'upload size allowed is 8M'
select file 40 MB, upload, error - form timeout
I even tried to modify .env file to add
# Docker-specific variables
PHP_UPLOAD_LIMIT=50
And even tried that to add as env value to docker-file:
services:
snipeit:
...
environment:
- PHP_UPLOD_LIMIT=50
And still displaying only 8M
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Okay, so I just noticed new Changelog resolved ISSUE for version So I've updated to I went into It's like it isn't reflecting my docker-compose setting (but other settings, like for the MAX_RESULTS, API_THROTTLE are working without a problem). I've edited once again
And now it works! |
Please confirm you have done the following before posting your bug report:
Describe the bug
While uploading a file onto Asset via "Upload" button or "Edit Asset" and "Select Image" in the bottom, the help-block states that allowed maximum file size is 8M, but actual allowed file size is 2M
To Reproduce
Steps to reproduce the behavior:
Expected behavior
File is Uploaded
OR
Help-Box show 2M
OR
I would have this setting added to the snipeit ENV
Screenshots
Server (please complete the following information):
Desktop (please complete the following information):
Smartphone (please complete the following information):
Error Messages
he given data failed to pass validation.
/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php#125
Illuminate\Validation\ValidationException
Demo server has 1024M help-box, I tried to upload 700M it did work.
Additional context
The text was updated successfully, but these errors were encountered: