Java.Maanavan
Java.Maanavan

Reputation: 1

How to get full file path of uploaded file in Spring

Hi I am trying to get the full file path of a file that I uploaded in Spring. I am able to get file name by using bean.getFile().getOriginalFilename(). But this gives just the file name like abc.csv. I tried searching answer for this in several forums and I am not finding proper way of retrieving file path information.

Upvotes: 0

Views: 722

Answers (1)

Sotirios Delimanolis
Sotirios Delimanolis

Reputation: 280102

Modern browsers do not send full path info for file uploads. They only send the short file name. There's no way to retrieve it if the client doesn't send it.

Upvotes: 1

Related Questions