mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
[shared file view] fixed download url for file from shared dir
This commit is contained in:
@@ -15,7 +15,7 @@ const propTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let loginUser = window.app.pageOptions.name;
|
let loginUser = window.app.pageOptions.name;
|
||||||
const { repoID, sharedToken, trafficOverLimit, fileName, fileSize, sharedBy, siteName, enableWatermark, download, zipped } = window.shared.pageOptions;
|
const { repoID, sharedToken, trafficOverLimit, fileName, fileSize, sharedBy, siteName, enableWatermark, download, zipped, filePath } = window.shared.pageOptions;
|
||||||
|
|
||||||
class SharedFileView extends React.Component {
|
class SharedFileView extends React.Component {
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ class SharedFileView extends React.Component {
|
|||||||
</Button>
|
</Button>
|
||||||
}{' '}
|
}{' '}
|
||||||
{!trafficOverLimit &&
|
{!trafficOverLimit &&
|
||||||
<a href="?dl=1" className="btn btn-success">{gettext('Download')}({Utils.bytesToSize(fileSize)})</a>
|
<a href={`?${zipped ? 'p=' + encodeURIComponent(filePath) + '&' : ''}dl=1`} className="btn btn-success">{gettext('Download')}({Utils.bytesToSize(fileSize)})</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user