[api] avoid validation of all uploaded source files to avoid OOM errors.

Some file names still get validated in that function