fix error cannot upload attachment