Save the attached file in 'data-dir'