html - Http Request. How to get png name? Spring Boot -


i've web app. have png file in /src/main/resources/static/images/head.png.

i want http request obtain png file (localhost:8080/images/head.png).

responseentity<byte[]> entity = new testresttemplate().getforentity("http://localhost/images/head.png", byte[].class);

and want know name of png file.

im trying code, doesn't work.

for example, using entity.getheaders().tostring() obtain:

server=[apache-coyote/1.1], last-modified=[mon, 28 sep 2015 22:03:31 gmt], content-type=[image/png;charset=utf-8], content-length=[442526], date=[tue, 29 sep 2015 21:02:11 gmt]

but there no information of name file.

how can name file? can check code here.

thanks

you cannot filename unless pass through additional parameter or header in original upload. http not know or care filesystems , associated them.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -