I think it's better to enclose `$key` as function parameter.
Attach a file by drag & drop or click to upload