I am trying to setup a filefield using imce to allow the user to upload files however I am having problems setting it up trying to get a unique folder for each node.
So for example I have set the imce directory path to
php: return $user->name.'/'.date('Y-m-d-H-i');
Which will upload files to user/2015-06-12-13-15.
However when the I click use the file browser if I don't upload the file within the same minute as when I clicked use the file browser, IMCE throws an error saying the directory doesn't exist as I imagine the date change throws off the upload.
I don't want to restrict users creating one node an hour so does anyone know of another way of generating random file paths for each node?