File extention from JPG to jpg

Hello everyone and have a great day! Hahaha :sweat_smile:!
I’ve encountered a very strange problem. It should be easily solved, but I can’t figure out how :see_no_evil:

The issue is that OpenAI only accepts .jpg, .png, etc., in lowercase. If a user sends a .JPG, an error is returned. I can’t figure out how to make the extension lowercase. Changing the file name doesn’t work, and trying to split by “.” and replace the last part also didn’t work. It’s such a silly problem. I’m sure someone else has solved it. Can you share?

You could send the URL and append the :lowercase operator to it

Thank you. It sounds very logical. But it’s not working. It needs to be changed at the time of file upload.