Hello,
From what you briefly described I can only guess it's an auto commit problem. This is well documented in the Mendix docs.
When an object is committed through a default Save button, a commit activity, or web services, it always triggers the commit events. The platform also evaluates all associated objects. To guarantee data consistency, the platform may also autocommit associated objects.
Hope this helps!
This usually happens because the file (or its parent object) is not committed. If the file is uploaded to an uncommitted or non-persistent object, it exists only for the session and gets lost after logout.
Quick checks:
In short: no commit = file disappears after logout.