|
@@ -64,13 +64,20 @@ module.exports = function(crowi, app) {
|
|
|
|
|
|
|
|
Attachment.getListByPageId(id)
|
|
Attachment.getListByPageId(id)
|
|
|
.then(function(attachments) {
|
|
.then(function(attachments) {
|
|
|
- var config = crowi.getConfig();
|
|
|
|
|
- var baseUrl = (config.crowi['app:url'] || '');
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // NOTE: use original fileUrl directly (not proxy) -- 2017.05.08 Yuki Takei
|
|
|
|
|
+ // reason:
|
|
|
|
|
+ // 1. this is buggy (doesn't work on Win)
|
|
|
|
|
+ // 2. ensure backward compatibility of data
|
|
|
|
|
+
|
|
|
|
|
+ // var config = crowi.getConfig();
|
|
|
|
|
+ // var baseUrl = (config.crowi['app:url'] || '');
|
|
|
return res.json(ApiResponse.success({
|
|
return res.json(ApiResponse.success({
|
|
|
attachments: attachments.map(at => {
|
|
attachments: attachments.map(at => {
|
|
|
var fileUrl = at.fileUrl;
|
|
var fileUrl = at.fileUrl;
|
|
|
at = at.toObject();
|
|
at = at.toObject();
|
|
|
- at.url = baseUrl + fileUrl;
|
|
|
|
|
|
|
+ // at.url = baseUrl + fileUrl;
|
|
|
|
|
+ at.url = fileUrl;
|
|
|
return at;
|
|
return at;
|
|
|
})
|
|
})
|
|
|
}));
|
|
}));
|