mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
15 lines
412 B
JavaScript
15 lines
412 B
JavaScript
import React from 'react';
|
|
import { gettext, siteRoot } from '../../utils/constants';
|
|
|
|
const {
|
|
fileName, repoID, objID, path
|
|
} = window.app.pageOptions;
|
|
|
|
function Download() {
|
|
return (
|
|
<a href={`${siteRoot}repo/${repoID}/${objID}/download/?file_name=${encodeURIComponent(fileName)}&p=${encodeURIComponent(path)}`} className="btn btn-secondary">{gettext('Download')}</a>
|
|
);
|
|
}
|
|
|
|
export default Download;
|