Connecting images and documents placed on a server to objects in Mendix

6
Consider the following situation: We place a folder on the server with a bunch of images and documents that are supplied by the customer. The customer supplies us with an Excel file in which articles are linked (by filename) to specific images and documents from step 1. We import this Excel file into a temporary object and create a microflow that processes this object by filling the Article object and it's relations to various other objects. The Article object inherits from System.Image and has a 0->1 relation with an object that inherits from System.FileDocument. Is it possible to create a microflow/java action that finds the proper image/document on the server and 'connects' (uploads) it to the System.Image/System.Document object by retrieving it from the folder on the server so that the customer doesn't have to upload each file manually for every Article object?
asked
2 answers
3

See the answer of Jonathan and me on a similar question. I hope this will help you out.

answered
3

You can use the

storeFileDocumentContent(IContext context, IMendixObject fileDocument, java.io.InputStream inputStream)

method to store a file on your server into a FileDocument.

answered