after-insert-file-set-buffer-file-coding-system instead of adding it to after-insert-file-functions.
Attach a file by drag & drop or click to upload