Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
File upload action - issues with replacing files #9267
File upload action preserves the filename of the original file, when the file is being replaced. This has implications if the new file is of different type, as it may lead to wrong mimetype/simpletype detection, if for some reason browser fails to detect mime correctly, or a plugin is trying to detect mimetype, rather than relying on the metadata value.
Not sure what the correct approach to fixing is. Probably restricting replacements of files of the same type would be the least evil solution. I am not sure if replacing the name will affect anything.