Content-Length добавлен
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package im.rosetta.api;
|
||||
|
||||
import im.rosetta.storage.FileStore;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
@@ -65,6 +64,7 @@ public class CdnResource {
|
||||
StreamingOutput stream = output -> Files.copy(file.get(), output);
|
||||
return Response.ok(stream)
|
||||
.header("Content-Disposition", "attachment; filename=\"" + tag + "\"")
|
||||
.header("Content-Length", Files.size(file.get()))
|
||||
.build();
|
||||
} catch (IOException e) {
|
||||
return Response.serverError()
|
||||
|
||||
Reference in New Issue
Block a user