How to avoid duplicate files uploaded to Mendix using System.FileDocument
Hi, I am using MyDocument → ( System.FileDocument) entity to upload the XML file into Mendix system. During upload , I am selecting name and Browse / path for the file and clicking Save button to save the document into System.FileDocument. If the same file is being uploaded one more time then system should not upload the document rather it would say file is already uploaded etc. For this requirement , I have added a MicroFlow → Onclick of Save button to check whether System.FileDocument table has the file name equals to MyDocument file name ( The one going to be uploaded) and based on that deciding if this file can be uploaded or not. But While entering into my MicroFlow ( On click save) itself the System.FileDocument table has the new file already uploaded. Does any one know how to avoid duplicate file is being uploaded. Appreciate your inputs / help on this.
It is important to note that when you select a file to upload, Mendix uses the name of the actual document that you uploaded, even if you type something different into the Name field – it will override this. This happens before committing.