Issue 2815 file upload rewrite