Issue 2522

changes for #2522 and #1702, please review, UI for rename not allowed and upload overwrite check is pending.