Simplify logic, avoid multiple unnecessary alloc/free operations.
Attach a file by drag & drop or click to upload