Added permission check to upload button