|
|
@@ -28,10 +28,12 @@ module.exports = function(crowi) {
|
|
|
}
|
|
|
|
|
|
function getFilePathOnStorage(attachment) {
|
|
|
+ const namespace = configManager.getConfig('crowi', 'gcs:uploadNamespace');
|
|
|
+ // const namespace = null;
|
|
|
const dirName = (attachment.page != null)
|
|
|
? 'attachment'
|
|
|
: 'user';
|
|
|
- const filePath = urljoin(dirName, attachment.fileName);
|
|
|
+ const filePath = urljoin(namespace || '', dirName, attachment.fileName);
|
|
|
|
|
|
return filePath;
|
|
|
}
|