For images we have a preview for use the preview link
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
7d8c5f73f5
commit
894958e3e2
|
@ -375,8 +375,10 @@ class ShareController extends Controller {
|
||||||
if ($shareTmpl['previewSupported']) {
|
if ($shareTmpl['previewSupported']) {
|
||||||
$shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview',
|
$shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview',
|
||||||
['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 't' => $shareTmpl['dirToken']]);
|
['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 't' => $shareTmpl['dirToken']]);
|
||||||
|
$shareTmpl['previewURL'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.publicpreview.directLink', ['token' => $token]);
|
||||||
} else {
|
} else {
|
||||||
$shareTmpl['previewImage'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'favicon-fb.png'));
|
$shareTmpl['previewImage'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'favicon-fb.png'));
|
||||||
|
$shareTmpl['previewURL'] = $shareTmpl['downloadURL'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load files we need
|
// Load files we need
|
||||||
|
|
|
@ -92,7 +92,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
||||||
</div>
|
</div>
|
||||||
<div class="directLink">
|
<div class="directLink">
|
||||||
<label for="directLink"><?php p($l->t('Direct link')) ?></label>
|
<label for="directLink"><?php p($l->t('Direct link')) ?></label>
|
||||||
<input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>">
|
<input id="directLink" type="text" readonly value="<?php p($_['previewURL']); ?>">
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue