Check if system has closefrom(2) and use that where available
Attach a file by drag & drop or click to upload