Search code examples
javaspring-mvcabsolute-pathfileitem

Get absolute filepath


I have org.springframework.web.multipart.commons.CommonsMultipartFile object and i need to get absolute file path on client device. Thanks debugger screenshot

I need to show picture to user, without saving on server.


Solution

  • You are not allowed to get the full path of client device, maybe you can spy the user's username or OS what he dont like you to know.

    Use FileApi from Javascript instead (How can I draw an image from the HTML5 File API on Canvas?).