-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
CI4: Convert File Upload Functionality #3452
Comments
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. |
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. |
@objecttothis is it me or this has already been ported to CI4? |
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. |
I worked on the thumbnail part. The file upload part looks CI4 for me. On which branch can i find what you have done? |
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. |
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. |
Works great. thanks |
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. |
Issue / Bug / Question / New Feature
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
https://codeigniter.com/userguide3/libraries/file_uploading.html?highlight=upload
The text was updated successfully, but these errors were encountered: