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
CI4 does not do image uploads the same way as CI3. We need to convert part of the save_info() and all of the _handle_logo_upload() function in app/Controllers/Config.php
Not sure if this is the forum for this but I for one would love the ability to have 2 logo's. One for receipts and one for the ospos login page.
I use a thermal printer and to ensure the logo prints well I have a really scaled back image for the thermal printer however it detracts from the overall look when logging in.
Not sure if this is the forum for this but I for one would love the ability to have 2 logo's. One for receipts and one for the ospos login page. I use a thermal printer and to ensure the logo prints well I have a really scaled back image for the thermal printer however it detracts from the overall look when logging in.
Hi @bradl822. You'll need to create a new issue and fill out the details completely. If someone wants to pick up the feature request, they can do so.
I started it, but I'm not sure I got it 100% correct. We just ported the thumbnail creation, but this is the file upload. Right now we can't test it because there are runtime errors.
Same branch. I'd started the work, which is why it looks CI4. I don't know that it's all correct though. If it looks good, let's leave it until the application is running and we can runtime test/debug it.
@jekkos I've fixed the company logo upload and I'm working on getting it properly removing the file when the user clicks remove image in Configuration > Information. There are a few questions that remain outstanding regarding the behavior of those functions. I'm not sure what the 3.3.9 behavior is but I think we have more options in CI4.
1- When uploading a new company_logo it goes into /public/uploads/ but do we rename the file and overwrite what is currently there?
2- If we don't rename and overwrite, do we delete old images? Not doing this could potentially clutter up the /public/uploads/ folder.
3- When a user clicks "Remove Image" do we leave nothing in there or do we restore the default ospos logo? The latter would require that we maintain that file with a different name (say "default_company_logo.jpg") and the value of company_logo becomes that value when the user clicks remove instead of being assigned ''.
I'm looking at the code in the master and it appears that the current behavior is to upload the file name as is given by the user and when removing the logo to not remove the file itself but instead to just remove the entry in the database. I suppose we can just keep current behavior and make any other changes to the behavior in another PR. One thing we do need to do is use guessExtension() rather than just writing the extension as is given by the user. This is considered best practice for security.
Company logo upload/change/remove now functions with the same functionality as 3.3.9. Next will be getting the image upload in the item edit views to work properly.
Item image upload is working again. Note: Fixing the problems required a migration script change. Make sure to run 20220127000000_convert_to_ci4.php before testing.
Activity
bradl822 commentedon Apr 1, 2022
Not sure if this is the forum for this but I for one would love the ability to have 2 logo's. One for receipts and one for the ospos login page.
I use a thermal printer and to ensure the logo prints well I have a really scaled back image for the thermal printer however it detracts from the overall look when logging in.
objecttothis commentedon Apr 4, 2022
Hi @bradl822. You'll need to create a new issue and fill out the details completely. If someone wants to pick up the feature request, they can do so.
ebentil commentedon Nov 20, 2022
@objecttothis is it me or this has already been ported to CI4?
objecttothis commentedon Nov 20, 2022
I started it, but I'm not sure I got it 100% correct. We just ported the thumbnail creation, but this is the file upload. Right now we can't test it because there are runtime errors.
ebentil commentedon Nov 23, 2022
I worked on the thumbnail part. The file upload part looks CI4 for me. On which branch can i find what you have done?
objecttothis commentedon Nov 23, 2022
Same branch. I'd started the work, which is why it looks CI4. I don't know that it's all correct though. If it looks good, let's leave it until the application is running and we can runtime test/debug it.
objecttothis commentedon Feb 20, 2024
@jekkos I've fixed the company logo upload and I'm working on getting it properly removing the file when the user clicks remove image in Configuration > Information. There are a few questions that remain outstanding regarding the behavior of those functions. I'm not sure what the 3.3.9 behavior is but I think we have more options in CI4.
1- When uploading a new company_logo it goes into /public/uploads/ but do we rename the file and overwrite what is currently there?
2- If we don't rename and overwrite, do we delete old images? Not doing this could potentially clutter up the /public/uploads/ folder.
3- When a user clicks "Remove Image" do we leave nothing in there or do we restore the default ospos logo? The latter would require that we maintain that file with a different name (say "default_company_logo.jpg") and the value of company_logo becomes that value when the user clicks remove instead of being assigned ''.
objecttothis commentedon Feb 20, 2024
I'm looking at the code in the master and it appears that the current behavior is to upload the file name as is given by the user and when removing the logo to not remove the file itself but instead to just remove the entry in the database. I suppose we can just keep current behavior and make any other changes to the behavior in another PR. One thing we do need to do is use guessExtension() rather than just writing the extension as is given by the user. This is considered best practice for security.
objecttothis commentedon Feb 20, 2024
Company logo upload/change/remove now functions with the same functionality as 3.3.9. Next will be getting the image upload in the item edit views to work properly.
odiea commentedon Feb 21, 2024
Works great. thanks
objecttothis commentedon Feb 26, 2024
Item image upload is working again. Note: Fixing the problems required a migration script change. Make sure to run 20220127000000_convert_to_ci4.php before testing.