After commit microflow file doesnt exist

After uploading a xml document i'm trying to map the xml elements to object with a xml to domain mapping. I've created a form where a file can be uploaded. I've created a after commit microflow which is calling the xml to domain mapping. But after upload i'll get an error like file doesn't exist. When I just upload a file and call the microflow with a invoke button it works. Why it isn't possible to directly import the xml elements after uploading? Is this a bug?
1 answers

This is because of the security implications with uploading filedocuments. The MendixObject is stored first (to check whether the user actually has rights to that Object) and the file is stored afterwards.

If we didn't do this people would be able to overwrite files that they don't have access to.

If you'd like this to work differently you can fill out a feature request in MXDN.