Fixed content-disposition
This commit is contained in:
parent
8cf2e5a3d8
commit
6d00320353
|
@ -37,7 +37,7 @@ public class CatalogueStorageHubManagement {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getOriginalFileName(HttpURLConnection httpURLConnection) throws ParseException {
|
protected String getOriginalFileName(HttpURLConnection httpURLConnection) throws ParseException {
|
||||||
String contentDisposition = httpURLConnection.getHeaderFields().get("Content-Disposition").get(0);
|
String contentDisposition = httpURLConnection.getHeaderFields().get("content-disposition").get(0);
|
||||||
contentDisposition = contentDisposition.replaceAll("= ", "=").replaceAll(" =", "=");
|
contentDisposition = contentDisposition.replaceAll("= ", "=").replaceAll(" =", "=");
|
||||||
ContentDisposition formDataContentDisposition = new ContentDisposition(contentDisposition);
|
ContentDisposition formDataContentDisposition = new ContentDisposition(contentDisposition);
|
||||||
return formDataContentDisposition.getFileName();
|
return formDataContentDisposition.getFileName();
|
||||||
|
|
Loading…
Reference in New Issue