Also revise a related function to minimise file handle/pipe leakage and improve reliability.
Attach a file by drag & drop or click to upload