Just a quick fix, it would probably be cleaner to avoid the shell in the first place.
Attach a file by drag & drop or click to upload