1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +00:00
Files
seahub/frontend/src/components/history-trash-file-view/download.js

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;