|
@@ -228,9 +228,14 @@ module.exports = function(crowi, app) {
|
|
|
res.set({
|
|
res.set({
|
|
|
ETag: `Attachment-${attachment._id}`,
|
|
ETag: `Attachment-${attachment._id}`,
|
|
|
'Last-Modified': attachment.createdAt.toUTCString(),
|
|
'Last-Modified': attachment.createdAt.toUTCString(),
|
|
|
- 'Content-Length': attachment.fileSize,
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ if (!attachment.fileSize) {
|
|
|
|
|
+ res.set({
|
|
|
|
|
+ 'Content-Length': attachment.fileSize,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// download
|
|
// download
|
|
|
if (forceDownload) {
|
|
if (forceDownload) {
|
|
|
res.set({
|
|
res.set({
|