[#6817] fix filename logic in import attachment handling
[#6833] restore not_empty validation; expand test