File uploads to proper folder, fixed api