Content-Length добавлен
This commit is contained in:
@@ -34,6 +34,7 @@ public class FilesResource {
|
|||||||
File target = resolved.toFile();
|
File target = resolved.toFile();
|
||||||
return Response.ok(target)
|
return Response.ok(target)
|
||||||
.header("Content-Disposition", "attachment; filename=\"" + target.getName() + "\"")
|
.header("Content-Disposition", "attachment; filename=\"" + target.getName() + "\"")
|
||||||
|
.header("Content-Length", target.length())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ public class FilesResource {
|
|||||||
File target = resolved.toFile();
|
File target = resolved.toFile();
|
||||||
return Response.ok(target)
|
return Response.ok(target)
|
||||||
.header("Content-Disposition", "attachment; filename=\"" + target.getName() + "\"")
|
.header("Content-Disposition", "attachment; filename=\"" + target.getName() + "\"")
|
||||||
|
.header("Content-Length", target.length())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user