mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-23 12:27:48 +00:00
add-download-url (#6771)
* add-download-url * update unitest * update * update * update * update * Update test_view_lib_file.py * code-optimize * Update shared-dir-view.js * code-optimize
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { siteRoot, gettext, username, enableSeadoc, thumbnailSizeForOriginal } from '../../utils/constants';
|
||||
import { siteRoot, gettext, username, enableSeadoc, thumbnailSizeForOriginal, fileServerRoot } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import TextTranslation from '../../utils/text-translation';
|
||||
import URLDecorator from '../../utils/url-decorator';
|
||||
@@ -189,6 +189,7 @@ class DirentListView extends React.Component {
|
||||
'url': `${siteRoot}lib/${repoID}/file${path}`,
|
||||
'thumbnail': `${siteRoot}thumbnail/${repoID}/${thumbnailSizeForOriginal}${path}`,
|
||||
'src': `${siteRoot}repo/${repoID}/raw${path}`,
|
||||
'downloadURL': `${fileServerRoot}repos/${repoID}/files/?op=download&p=${path}`,
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user