mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
[shared file view] fixup for download url (#4026)
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
|
|
||||||
const { err, trafficOverLimit } = window.shared.pageOptions;
|
const { err, trafficOverLimit, zipped, filePath } = window.shared.pageOptions;
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
errorMsg: PropTypes.string
|
errorMsg: PropTypes.string
|
||||||
@@ -21,7 +21,7 @@ class SharedFileViewTip extends React.Component {
|
|||||||
<div className="file-view-tip">
|
<div className="file-view-tip">
|
||||||
{errorMsg}
|
{errorMsg}
|
||||||
{!trafficOverLimit &&
|
{!trafficOverLimit &&
|
||||||
<a href="?dl=1" className="btn btn-secondary">{gettext('Download')}</a>
|
<a href={`?${zipped ? 'p=' + encodeURIComponent(filePath) + '&' : ''}dl=1`} className="btn btn-secondary">{gettext('Download')}</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user