Improve implementation of jQuery uploader for handle attachments