fixing upload with attributes