forked from loafle/openapi-generator-original
Remove path delimiters from downloading filename
This commit is contained in:
@@ -724,8 +724,9 @@ public class ApiClient {
|
||||
// Get filename from the Content-Disposition header.
|
||||
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
|
||||
Matcher matcher = pattern.matcher(contentDisposition);
|
||||
if (matcher.find())
|
||||
filename = matcher.group(1);
|
||||
if (matcher.find()) {
|
||||
filename = matcher.group(1).replaceAll(".*[/\\\\]", "");
|
||||
}
|
||||
}
|
||||
|
||||
String prefix = null;
|
||||
|
||||
Reference in New Issue
Block a user