Made uploading work properly