This works for everything we already did, but I needed this to work for the file input on the upload dialog.