Content-Length добавлен

This commit is contained in:
RoyceDa
2026-02-16 23:41:40 +02:00
parent b9cb927d2b
commit ee15a2b9dd

View File

@@ -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()