If you can’t change that horrible client code I would just modify the parameters on the recieving end so that you get a fixed key that you can permit and work with:
params.merge(
files: params.values.select { |v| v.is_a?(ActionDispatch::Http::UploadedFile) }
).permit(:foo, :bar, files: [])
CLICK HERE to find out more related problems solutions.