I'm creating an image upload app where the user can edit image metadata. The current way I'm handling file upload is with multipart file.
fun handleFileUpload(@RequestParam files: Array<MultipartFile>): String {
This works, but I lose access to all file metadata for the images. I'm wondering what the ideal way to do this so I can access metadata? I know the Java.io.File class has metadata access.
I'd prefer to maintain drag and drop functionality on my Angular front end.
CodePudding user response:
File meta data is not image meta data...
In java we can:
-
And with:
<dependency> <groupId>com.drewnoakes</groupId> <artifactId>metadata-extractor</artifactId> <version>2.16.0</version> </dependency>
We get (with few lines) something more like that:
Thanks to blog for
javax.imageio
"crawling".