auto resize in upload class