Java File Upload

I have created a java action to upload a file to system.FileDocument. This is the code: - File docfolder = new File("C:\\Users\\Sony\\My Websites\\mendix\\StreetCraneExpress\\docs\\x.pdf"); IMendixObject newCreateObject = Core.create(this.getContext(), "System.FileDocument"); FileInputStream input = new FileInputStream(docfolder); Core.storeFileDocumentContent(this.getContext(), newCreateObject, input); Core.commit(this.getContext(), newCreateObject); The script seems to create an object with a number but I'm not able to download the document. thanks
0 answers