File upload fix + REST API cookie based