Reading FileDocument or Image metadata

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!
2 answers

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- provide this information by default, you would need to do it yourself. You can implement a new widget based on html 5- or extend one of the existing widgets in the appstore.



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: