Attachment type refactored added as parameter to createAttachment
Fix attachment type introduction