I have added a field type in my userforms module so that i have a modern uploadfield with drag and drop.
To do this I simply took a copy of the original editablefilefield and modified the "new FileField" to "new Uploadfield".
A few other settings were added to prevent user meddling with files, plus I set the folder.
It all works well - or seems to, but there is a snag. The uploads have been completed on a form that has not yet been submitted and so has no ID of any sort. The uploaded images(actually there may be four instances in this form), have to be unique but hopefully with names that superficially bear some resemblance to the ones the users uploads. I cant use the form ID, so how can I make the UploadField produce unique names?
I have a field on the form (don't forget it's a userform) that has a customer id. This could be used as a prefix. I fear I am getting into custom form territory here. Maybe I could add a field in the CMS to pull the data from another field. But even this has a snag. They might upload the images first! Back to random prefix....
Julian