Internally, the fully qualified filename plus its modification timestamp should be pretty close to unique. Add the user's ID (or less reliably, full name) and you have a reasonable shot at uniqueness. If you need a user-friendly ID, shove the internally generated ID into a DB table with an auto-increment key and use it as a translation table.