Instead of returning 0 for success and -1 for failure, return true or false. This seems more natural.
Attach a file by drag & drop or click to upload