Hi! I'm currently trying to block a file from being submitted if there is already another file with the same name in the server/database.
I use the method getFileFields() to force the uploaded file to keep the original name... And I need a way to check, when submitting a new file through admin panel, if there is already an equally named file.
I tried using FormItem::file()->unique(), but without success...
Hi! I'm currently trying to block a file from being submitted if there is already another file with the same name in the server/database.
I use the method getFileFields() to force the uploaded file to keep the original name... And I need a way to check, when submitting a new file through admin panel, if there is already an equally named file.
I tried using FormItem::file()->unique(), but without success...
Any ideas?
Thank you!