mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
add config module
This commit is contained in:
@ -23,7 +23,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
var config = require("../config");
|
||||
var configServer = require('config').get('server');
|
||||
var siteUrl = configServer.get('siteUrl');
|
||||
var tempStorageUrl = siteUrl + configServer.get('tempStorageUrl');
|
||||
|
||||
var fileUtility = {};
|
||||
|
||||
@ -32,7 +34,7 @@ fileUtility.getFileName = function (url, withoutExtension) {
|
||||
|
||||
var filename;
|
||||
|
||||
if (config.tempStorageUrl && url.indexOf(config.tempStorageUrl) == 0) {
|
||||
if (tempStorageUrl && url.indexOf(tempStorageUrl) == 0) {
|
||||
var params = getUrlParams(url);
|
||||
filename = params == null ? null : params["filename"];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user