[fix] attachments upload "Maximum call stack size exceeded" error fix