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:
committed by
Daniel Pan
parent
a2cc17778c
commit
c0d645962f
@@ -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 = '';
|
||||
|
Reference in New Issue
Block a user