Fixed content-disposition

This commit is contained in:
Luca Frosini 2021-04-19 14:50:30 +02:00
parent 8cf2e5a3d8
commit 6d00320353
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class CatalogueStorageHubManagement {
}
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 formDataContentDisposition = new ContentDisposition(contentDisposition);
return formDataContentDisposition.getFileName();