#879 - fix attr error when no file is uploaded