Fixed upload permission check