Basically, if I'm trying to save a file from a URL, there may be query parameters after the file extension. So, we need to remove the query parameters so that we can get a valid file extension & mime type. Since question marks aren't allowed in file names or extensions, I figured it was unnecessary to do any further validations (like if the string was a URL or not).
Basically, if I'm trying to save a file from a URL, there may be query parameters after the file extension. So, we need to remove the query parameters so that we can get a valid file extension & mime type. Since question marks aren't allowed in file names or extensions, I figured it was unnecessary to do any further validations (like if the string was a URL or not).