1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

Optimized code structure (#2430)

* combine utils file

* modify file position
This commit is contained in:
shanshuirenjia
2018-10-09 10:56:59 +08:00
committed by Daniel Pan
parent a2cc17778c
commit c0d645962f
45 changed files with 87 additions and 96 deletions

View File

@@ -1,5 +1,5 @@
import {siteRoot, historyRepoID, fileServerRoot } from '../components/constants';
import { encodePath } from '../components/utils';
import {siteRoot, historyRepoID, fileServerRoot } from './constants';
import { Utils } from './utils';
class URLDecorator {
static getUrl(options) {
@@ -14,7 +14,7 @@ class URLDecorator {
url = fileServerRoot + 'zip/' + options.token;
break;
case 'download_file_url':
url = siteRoot + 'lib/' + options.repoID + '/file' + encodePath(options.filePath) + '?dl=1';
url = siteRoot + 'lib/' + options.repoID + '/file' + Utils.encodePath(options.filePath) + '?dl=1';
break;
default:
url = '';