Reading FileDocument or Image metadata

0
Hi, I'm trying to create an app that enables users to upload a file where the app will also store the metadata of the file. I created a custom Java action to try achieve this using the method Core.getFileDocumentContent But Core.getFileDocumentContent will return InputStream. I can't get filesystem-level metadata from an InputStream since it doesn't know the exact path or filename of the file. Does anyone have experience with this? Thanks!
asked
2 answers
0

Hi Rionald,

I believe the problem is in the file upload widget, which strips away (or never reads) the file metadata.
Unless some of the widgets in the app store e.g. Dropzone-https://appstore.home.mendix.com/link/app/916/ provide this information by default, you would need to do it yourself. You can implement a new widget based on html 5-https://www.html5rocks.com/en/tutorials/file/dndfiles/ or extend one of the existing widgets in the appstore.

-Andrej

answered
0

About what kind of metadata are we talking about? Because indeed last changed etc IN the file would change when you do a download again. So I am still wondering what you are trying to achieve here. Can you give an example of the kind of metadata you want to keep in the file?

And you could try to store the metadata outside of the file and put it in again when downloading the file. See this stackoverflow post on how to retrieve metadata in Java: https://stackoverflow.com/questions/10824027/get-the-metadata-of-a-file

Regards,

Ronald

 

answered